Check if particle-system is playing

I admit that I am blind to some ‘gribs’ of coding in here - amongst them the pc.component.
Could have been nice with examples within https://developer.playcanvas.com/en/api/pc.ParticleSystemComponent.html.

Anyway: Get the feeling that this isn’t working correctly:

if(myPartSys.particlesystem.isPlaying() === false) { … etc

  • how to use?

(ps: have been looking at this: ☑ Particle not play again sometimes)

Here’s a project that has the play/pause/stop functions on buttons: https://playcanvas.com/editor/scene/934545

There seems to be a bug where if the user presses stop, the isPlaying function doesn’t think the particle system has stopped until long past the lifetime of the particles. I will add a bug to the engine repo.

Nice. Found a tolerable solution within the HTML-based problem I had (but thanks anyway).
Went form a state of having the particle-system not-enabled to enabled (and that caused issues).

A lot of delay before enabling the quite heavy fire-realistic particlesystem, and before the particles were .isPlaying, I could not get an output of either state … maybe both due to the issue you reported, but also due to performance-break -> pause in the frame update