Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2005, 4:41:53 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: particles should get spread evenly if Emitter moves

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc

    r4017 r4129  
    137137            randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
    138138            Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
    139            
    140             system->addParticle(this->getAbsCoor(), velocityV);
     139
     140            // this should spread the Particles evenly. if the Emitter is moved around quickly
     141            Vector equalSpread = this->getVelocity() * random()/RAND_MAX * dt;
     142            equalSpread.debug();
     143
     144            system->addParticle(this->getAbsCoor() - equalSpread, velocityV);
    141145          }
    142146      }
Note: See TracChangeset for help on using the changeset viewer.