Hi!
There are ParticleEmitters in my scene. When camera moves along the X Y axes, the particle abruptly shifts and is a short distance from original position. When the camera stops, particles returns to its original position.
I have particles that are bound to a node, and I have particles that are bound to a rootNode. In both cases, the behavior is the same.
Particle emitter attach:
ParticleEmitter electricBall = new ParticleEmitter(id, ParticleMesh.Type.Triangle, 30);
electricBallMat.setTexture("Texture", assetManager.loadTexture("Interface/Effects/thunder_t1.png"))
electricBall.setMaterial(electricBallMat);
electricBall.setImagesX(5);
electricBall.setImagesY(1);
electricBall.setParticlesPerSec(1);
electricBall.setSelectRandomImage(true);
electricBall.setGravity(0, 0, 0);
electricBall.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 0, 0));
electricBall.getParticleInfluencer().setVelocityVariation(0f);
electricBall.setLowLife(0.2f);
electricBall.setHighLife(0.5f);
electricBall.setStartSize(3.5f);
electricBall.setEndSize(3.5f);
electricBall.setQueueBucket(RenderQueue.Bucket.Translucent);
final Node electricBallEffect = new Node(id + "electricBall");
electricBallEffect.setLocalTranslation(x, z, y);
electricBallEffect.attachChild(electricBall);
renderManager.preloadScene(electricBallEffect);
rootNode.attachChild(electricBallEffect);
simpleUpdate method :
@Override
public void simpleUpdate(float tpf) {
super.simpleUpdate(tpf);
insideCounter++;
if (insideCounter % 10 == 0) {
electricBall.emitAllParticles();
}
if (insideCounter == 1000) {
insideCounter = 0;
}
}