Changeset 4176 in orxonox.OLD for orxonox/trunk/src/lib/graphics/particles/particle_emitter.cc
- Timestamp:
- May 13, 2005, 11:09:20 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/particles/particle_emitter.cc
r4017 r4176 137 137 randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction); 138 138 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 143 system->addParticle(this->getAbsCoor() - equalSpread, velocityV); 141 144 } 142 145 }
Note: See TracChangeset
for help on using the changeset viewer.