[Orxonox-commit 5289] r9952 - code/trunk/src/orxonox/worldentities

landauf at orxonox.net landauf at orxonox.net
Fri Jan 3 15:41:45 CET 2014


Author: landauf
Date: 2014-01-03 15:41:45 +0100 (Fri, 03 Jan 2014)
New Revision: 9952

Modified:
   code/trunk/src/orxonox/worldentities/BigExplosion.cc
   code/trunk/src/orxonox/worldentities/BigExplosion.h
Log:
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".

Modified: code/trunk/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/BigExplosion.cc	2014-01-03 14:30:25 UTC (rev 9951)
+++ code/trunk/src/orxonox/worldentities/BigExplosion.cc	2014-01-03 14:41:45 UTC (rev 9952)
@@ -99,7 +99,7 @@
         this->debris3_->setSyncMode(0);
         this->debris4_->setSyncMode(0);
 
-        this->explosion_ = new MobileEntity(this->getContext());
+        this->explosion_ = new StaticEntity(this->getContext());
         this->explosion_->setSyncMode(0);
 
         this->debrisSmoke1_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
@@ -147,18 +147,13 @@
         this->debrisEntity3_->attach(debris3_);
         this->debrisEntity4_->attach(debris4_);
 
-        // ///////////////////////
-        // TODO: particleSpawner is a static entity. It should probably be dynamic, for better explosions.
-        //
         ParticleSpawner* effect = new ParticleSpawner(this->getContext());
-        // effect->setVelocity(this->getVelocity());
         effect->setDestroyAfterLife(true);
         effect->setSource("Orxonox/explosion2b");
         effect->setLifetime(4.0f);
         effect->setSyncMode(0);
 
         ParticleSpawner* effect2 = new ParticleSpawner(this->getContext());
-        // effect2->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10, 200));
         effect2->setDestroyAfterLife(true);
         effect2->setSource("Orxonox/smoke6");
         effect2->setLifetime(4.0f);

Modified: code/trunk/src/orxonox/worldentities/BigExplosion.h
===================================================================
--- code/trunk/src/orxonox/worldentities/BigExplosion.h	2014-01-03 14:30:25 UTC (rev 9951)
+++ code/trunk/src/orxonox/worldentities/BigExplosion.h	2014-01-03 14:41:45 UTC (rev 9952)
@@ -59,7 +59,7 @@
 
             bool                  bStop_;
 
-            MobileEntity*         explosion_;
+            StaticEntity*         explosion_;
 
             MovableEntity*        debrisEntity1_;
             MovableEntity*        debrisEntity2_;




More information about the Orxonox-commit mailing list