Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 23, 2005, 4:48:57 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: inherit speed from emitter is now also an option
for this i had to write a new PNode function, getVelocity (patrick: you could also use this one in the shoot-class, maybe).

File:
1 edited

Legend:

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

    r3936 r3938  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: Patrick Boenzli
    1414*/
    1515
    16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_PARTICLE
    1717
    1818#include "particle_emitter.h"
     
    132132      randDir.normalize();
    133133      randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction);
    134       randDir.normalize();
     134      randDir = *randDir.getNormalized() + (this->getVelocity() * system->inheritSpeed);
     135
    135136      system->addParticle(this->getAbsCoor(), randDir* velocity);
    136137    }
Note: See TracChangeset for help on using the changeset viewer.