animation - Moving (comet tail) effect of particle emitter without actual moving -
I have a sprite in my scene and inside this sprite there is a particle emitter. Therefore, when I use the Phantom (Move Action), then I can see the animation running for both phantom and particle emitter. The deletion animation did not affect the old particles (which was emitted before the animation) and I can see something like a tail, just like comets, everything is fine. Now, if I take the action for the phantom and move it, then say, make an action with 100 pixels up and down the emeter for 100 pixels, then the emitter will be inspired by 100 pixels, but relatively live on the screen. And there will be no "comet tail" effect, therefore, that means the exhausted particles are not related to the phantom, but for some more
then my question is that I am "comet tail" How can Rbav am, without actually moving screen? Or imagine, I have a layer with sun emission and at some point I will decide to move this layer (scroll) and my sun emission will also scroll with the layer, but the old emitted particle "comet tail" effect Because they are not related to the layer, but some other. How can I move that scene without the "comet tail" effect?
Thank you!
OK, so it is the status type specified by the particle engine of Cocos 2D:
- Free - Particles are linked to the world to survive and are unaffected by the emitter repositioning.
- Relative - Living particles connected to the world, but emitter repositioning will follow. Use the case: Attach an emiter for a sprite, and you want the emitter to follow the phantom.
- Group particles are connected to emitter and translated with it.
If you do not want to take the particles relatively closer to the world, then you need either a relay or group.
If you want to make the particles a mark If you want, you need free.
emitter-> setPositionType (_posType);
If you think I am not getting your point, please post some code to clarify the problem - it is a bit difficult to understand your problem.
Comments
Post a Comment