i have a particle emitter and i attach the particlescenenode to another node. (seParent()) but i dont want the emitter to rotate while attaching it to the parent. can i prevent it from rotating?? or can i rotate it back after attaching it?
________
Healthy living advice
rotate a particle emitter
rotate a particle emitter
Last edited by katze555 on Thu Feb 24, 2011 7:41 am, edited 1 time in total.
There is no way that I am aware of but the fastest way to achieve what you want is to NOT set a parent, instead set the position of the particle system scenenode each cycle to the position of the parent you initially wanted. This means you lose the features of it being a child of node (automatic removal and visibility).
the problem is, the position of the particle effect is not the position of the parent, the parent (a bone) is rotating and movingall the time, so its very hard so keep the position of the particleeffect without setting it as a child
________
LAMBORGHINI V10
________
LAMBORGHINI V10
Last edited by katze555 on Thu Feb 24, 2011 7:41 am, edited 1 time in total.
It seems you could implement a scene node similar to a dummy scene node that would ignore the rotation of its parent. You could do this by inheriting from ISceneNode and overriding updateAbsolutePosition() to ignore the rotation of the parent scene node (if any).
Then you just need to attach one of these nodes to the parent node, and attach the particle system to that.
Travis
Then you just need to attach one of these nodes to the parent node, and attach the particle system to that.
Travis
the problem is i want it to rotate with the parent later, but i dont want tochange its rotation while attaching it
________
VAPORIZER REVIEW
________
VAPORIZER REVIEW
Last edited by katze555 on Thu Feb 24, 2011 7:41 am, edited 1 time in total.
i think i got it:
this neutralizes the rotation coming from the parent.
the other problem is now i need to do the same with the position...
________
Mexico Hotels
Code: Select all
_ps->setParent(bone);
_ps->setRotation((-1)*_ps->getParent()->getAbsoluteTransformation().getRotationDegrees());
the other problem is now i need to do the same with the position...
________
Mexico Hotels