Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9952


Ignore:
Timestamp:
Jan 3, 2014, 3:41:45 PM (10 years ago)
Author:
landauf
Message:

neither ParticleSpawner nor the explosion_ object need to be MovableEntities since they are all attached to BigExplosion which is itself movable.
if you want the explosion particles to move in local space (i.e. if you want to avoid the smoke- and fire-tail of a moving explosion) use a different particle-effect which has the "local_space" property set to "true".

Location:
code/trunk/src/orxonox/worldentities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/BigExplosion.cc

    r9949 r9952  
    100100        this->debris4_->setSyncMode(0);
    101101
    102         this->explosion_ = new MobileEntity(this->getContext());
     102        this->explosion_ = new StaticEntity(this->getContext());
    103103        this->explosion_->setSyncMode(0);
    104104
     
    148148        this->debrisEntity4_->attach(debris4_);
    149149
    150         // ///////////////////////
    151         // TODO: particleSpawner is a static entity. It should probably be dynamic, for better explosions.
    152         //
    153150        ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    154         // effect->setVelocity(this->getVelocity());
    155151        effect->setDestroyAfterLife(true);
    156152        effect->setSource("Orxonox/explosion2b");
     
    159155
    160156        ParticleSpawner* effect2 = new ParticleSpawner(this->getContext());
    161         // effect2->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10, 200));
    162157        effect2->setDestroyAfterLife(true);
    163158        effect2->setSource("Orxonox/smoke6");
  • code/trunk/src/orxonox/worldentities/BigExplosion.h

    r9951 r9952  
    6060            bool                  bStop_;
    6161
    62             MobileEntity*         explosion_;
     62            StaticEntity*         explosion_;
    6363
    6464            MovableEntity*        debrisEntity1_;
Note: See TracChangeset for help on using the changeset viewer.