Particles sometime travel too far

I’ve created a simple very short particle burst using the settings below. However I’ve noticed that occasionally since adding it I’m getting camera flickers.
In the editor if I view the system, I can see occasional particles go rogue and burst out at huge velocities.
The maximum velocity is +/- 3.5 on X,Z and +2 on the Y. The lifespan is 0.2. Unless I’ve done something wrong, the particles should not ever go this fast and far.
Flickering is not acceptable for this project so we can’t use the particle system unless we can either find and fix the bug, or find and avoid the criteria that trigger it.
The bit I’m not sure about (and possible source of this effect) is how radial speed is combined with velocity. The radial speed here is set to start at 5 and diminish to 0 (I wanted to apply ‘friction’ and this is the closest I could find in the settings available). If they’re multiplied together that might account for it. EDIT: it’s not radial speed, I set it to zero and get the same effect.

Maybe you can create an empty project with a default particle system that is set up as in your project? Then someone may look at it and give an advice.

That was a pain to extract, but here you go.
https://launch.playcanvas.com/1998209?debug=true

The first cycle of 6 hops, you’ll see the particles from each tile hitting the camera. I don’t see it any more after that, which makes me think the problem could be in the pre-warm setting (or lack thereof).

I hate to do this, but bump… Can anyone help with this please?

When I ran into flashing problems with the particle playing after moving it, I usually used the hack below.

/** @param {pc.Entity} particleEntity
 * @param {pc.Vec3} position
 * @param {pc.Quat} rotation
*/
ParticleManager.prototype.playAt = function(particleEntity, position, rotation = undefined) {
    if(!rotation) rotation = pc.Quat.IDENTITY;
    particleEntity.setPosition(position);
    particleEntity.setRotation(rotation);
    particleEntity.particlesystem.reset();
    this.app.once('frameend', ()=>{
        particleEntity.particlesystem.play();
    });
};

So it looks like a bug to do with the sorting algorithm. Changing it from camera distance to None (default) works around the issue.

https://playcanvas.com/editor/scene/2007047

1 Like