Rotating a particle emitter?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dotProduct
Posts: 5
Joined: Sun Apr 22, 2012 3:26 am

Rotating a particle emitter?

Post by dotProduct »

I'm trying to use particle emitters to simulate rocket exhaust. Sometimes the rockets turn in flight and I'd like the exhaust to turn with them. There doesn't appear to be a way to rotate or change the direction the particles are emitted once by an IParticleSystemSceneNode except to create a new IParticleEmitter and attach it with the IParticleSystemSceneNode::setEmitter(em). Is this what I need to do to update the rotation? Changing the rotation of the node with setRotation(rotation) on the particle system node or its parent node does nothing, and there doesn't seem to be another member function that does. Am I missing something?
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Rotating a particle emitter?

Post by smso »

Code: Select all

emitter->setDirection(heading * (-0.002f));
Regards
smso
dotProduct
Posts: 5
Joined: Sun Apr 22, 2012 3:26 am

Re: Rotating a particle emitter?

Post by dotProduct »

Ah, that does the trick. I guess I just need to hold on to the emitter. It would really be nice if node rotations worked on particle emitters.
Post Reply