How can I know a particle system is completely stopped?

I want to add some callbacks when a particle system is completely stopped.
onStoppedObservable doesn’t satisfy my need. The reason is, first, when it notifies, the particle system is stopping, not stopped; second, when the particle system has SubEmitter, I can’t get the event when all of these subEmitters are stopped.

Hello!

There’s onAnimationEnd on BaseParticleSystem BaseParticleSystem | Babylon.js Documentation (babylonjs.com) or you could listen directly for animation end event on the animations list maybe? BaseParticleSystem | Babylon.js Documentation (babylonjs.com)

As for the subemitters, each one is also a ParticleSystem so it should also have the same events that can be listened.

1 Like

You can also check for particleSystem.isAlive: if it returns false, it means there is no particle active in the system.

1 Like