hey @t0neg0d, im late to the game here but ive got a little minor input on the bug youre speaking about (where setParticlesFollowEmitter(false) ) seems to not work to create the effect of particles being casted into the world, i think this might help reveal how to fix the problem. I think your underlying concept works, just perhaps you have a typo or a minor mistake somewhere in the logic.
anyways using your example code from the original post (with the exception that I make an “attachmentNode” where i add the control to, isntead of adding the emitter control to the rootnode.
anyway my first try to make this work i did just this:
[java]
e1.setParticlesFollowEmitter(false);
…
@Override
public void simpleUpdate(float tpf) {
super.simpleUpdate(tpf);
attachmentNode.move(tpf, 0, 0); // emitter moves to the right
}
[/java]
of course the smoke trail effect is going straight up, so i thought, “i wonder if i move the emitter node instead?”
so i do this
[java]
@Override
public void simpleUpdate(float tpf) {
super.simpleUpdate(tpf);
e1.getEmitterNode().move(tpf, 0, 0);
}
[/java]
well now it looks like the emitter is moving to the right, because its trailing off in to the left… however the emitter itself is standing still.
but if you combine the two lines of code… 0_o it creates the desired effect (moving particle emitter, and particles appear to be cast in to the world).
so its like its just using the translation of the wrong parent node.
i havent yet had the chance to fully understand your emitter system, but from your previous post it looks like the relevant code for this is in ParticleDataTriMesh.java on line 297ish… so I put this in there
[java]
if (emitter.getEmitterNode().getParent() != null) {
System.out.println(“not null”);
tempV3.set(p.position).subtractLocal(emitter.getEmitterNode().getParent().getWorldTranslation().subtract(p.initialPosition));
} else {
System.out.println(“wtf null?”);
tempV3.set(p.position).subtractLocal(emitter.getEmitterNode().getWorldTranslation().subtract(p.initialPosition));
}
[/java]
however its always “wtf null”. this goes into a subthought: perhaps the fact that the emitter node’s parent is null is why the trailing effect isnt working properly.
or maybe you already know all this and im wasting your time >.<. just trying to throw in my discoveries here so that maybe this could be figured out.