Move a Particle Emitter

Hello again,

is there a way to move a particle emitter without waiting the “next animation cycle”? I want to move my particle emitter while it’s updating his texture (during animation); I’ve created a particle emitter, setted all the params and with the arrow keys I try to move it calling the move method on simpleUpdate (I also tried setLocalTranslation) but it changes its position only after animation cycles. Any suggestion?



Update: Solved with setInitialVelocity, in this way I define the direction of the particle emitter depending on the key pressed. :slight_smile:

@AndreaTucci: See setInWorldSpace:

http://hub.jmonkeyengine.org/javadoc/com/jme3/effect/ParticleEmitter.html#setInWorldSpace(boolean)

1 Like

Oh great! Thank you!

@Momoko_Fan Is this set to true by default? Maybe I found this when I was playing around with the particle emitter, but I don’t recall actually having this problem (and it was the first thing I tried of course… HAVE to set your players on fire before you actually do something productive). It’s been quite a while, so chances are I found this and did just what you said.

Yes, it is enabled by default. The javadocs for this method explain very clearly what it is doing, you should read them.

@Momoko_Fan said:
Yes, it is enabled by default. The javadocs for this method explain very clearly what it is doing, you should read them.


I'm sure I did, when I was playing around with the particle emitter (which would not be now... or for quite some time)... the reason I asked is you told him to set it to true... which isn't really necessary if it is defaulted to true... yeah? /boggle This confused me... and I wanted to clarify that what I remember reading (the javadocs... go figure) was indeed correct.