Particle Emitter trailing a Geometry

I am having an issue with displaying a Particle Emitter on a moving geometry.

So i made a sphere with a Ghostcontrol and RigidBodycontrol,this is shot out of the player everytime they press spacebar. Then i made a particle emitter thats attached a node which in turn follows wherever the sphere is.
This is in my update method
[java]
spellCastEffect.setLocalTranslation(sphere.getWorldTranslation());
[/java]

The problem is that my particle emitter trails (is always behind the node) when moving, if its still then the particle fits nice and snug where the sphere is but if moving it is not. It also creates a new emitter each frame
Example:

I want to the particle emitter to always be where the node is and constantly display and not make duplicates each frame

@JacobAmaral said: I am having an issue with displaying a Particle Emitter on a moving geometry.

So i made a sphere with a Ghostcontrol and RigidBodycontrol,this is shot out of the player everytime they press spacebar. Then i made a particle emitter thats attached a node which in turn follows wherever the sphere is.
This is in my update method
[java]
spellCastEffect.setLocalTranslation(sphere.getWorldTranslation());
[/java]

The problem is that my particle emitter trails (is always behind the node) when moving, if its still then the particle fits nice and snug where the sphere is but if moving it is not. It also creates a new emitter each frame
Example:

I want to the particle emitter to always be where the node is and constantly display and not make duplicates each frame

Are you wanting the particles to move with the node as in, not use world translation per particle?

If so, I thought there was a flag to set this to world/local. Lemme check…

Ok… try:

[java]
ParticleEmitter.setInWorldSpace(false);
[/java]

1 Like

@t0neg0d
Exactly what i wanted, thank you!

1 Like