setPosition with Particle

I think there is a problem with setPosition and ParticleEmitter.

Some particles are emitted at previous location.

I made a simple project:

You can click the screen to play the particles.
Expected behavior: All particles will be played at same position.


1 Like

Yes, I’ve noticed this as well. You begin to have to become redundant with your setPositions. I ended up just slapping that in an onUpdate and onClick event handlers because I just wanted to always make sure that it’s in the right spot, ya know?

Any updates or fixes?

The particle system runs a GPU code path, but falls back to a CPU code path in certain circumstances. It seems there is different behavior for the GPU code path compared to the CPU path.

I can force your particle systems in that project to the CPU by adding this code to the end of the initialize function in TreasureBox.js: =  true;

    this.particleArr.forEach(function (entity) {

Then it seems to work fine. I’ll see if I can find where the problem is in the GPU path.