Is it the right way to move particle to a point?

Hello all,
I want to move particle to a point, to do it, I attach my particle emitter to a node and I use interpolate between the node with emitter and the target node.
My node looks like to move but not my particle, here is my code:
[java]@SuppressWarnings(“deprecation”)
public void init(){
if(!init){
emit = new ParticleEmitter(“Emitter”, Type.Triangle, 300);
emit.setGravity(0, 0, 0);
emit.setVelocityVariation(1);
emit.setLowLife(1);
emit.setHighLife(1);
emit.setInitialVelocity(new Vector3f(0, .5f, 0));
emit.setImagesX(15);
Material mat = new Material(Game.getAssetManager(), “Common/MatDefs/Misc/Particle.j3md”);
mat.setTexture(“Texture”, Game.getAssetManager().loadTexture(“Effects/Smoke/Smoke.png”));
emit.setMaterial(mat);

        partNode.attachChild(emit);
        Game.getRootNode().attachChild(partNode);
        emit.setLocalTranslation(src.getLocation());
        emit.emitAllParticles();
        init = true;
	}
}

@Override
public void update() {
	if(target != null){
		partNode.setLocalTranslation(partNode.getLocalTranslation().interpolate(target.getLocalTranslation(), 1f));
	}
	
}[/java]

you have to call emit.setInWorldSpace(true);

I tried it and now I think it do not go in the right direction.
Is the use of interpolate is correct ?

the 1f in the end is weird should be something that varies over time…like a time variable where you would stack the tpf.

Well I tried with tpf it is a bit weird, but it is probably my implementation, I will continue to work on it :slight_smile:

not only tpf.
you need something like

time =+tpf ;
interplotate (bla, bla, time);

and stop when time is >=1;

Oh ok thank you :slight_smile: