Strange behaviour with particles

Hello, I have a simple particle animation:
https://playground.babylonjs.com/#IQPBS4#7
the mesh emitter move along a path (it’s a baked animation),
and I have 2 problems:

  1. When it start it’s strange, because as you will see many particles are created, then the emitter doesn’t create them anymore, and next it start again to create particles…
    The 2nd loop, instead, it’s right…
    What’s happening?
  2. I should use just one loop, and dispose the emitter when it reach the end of the animation.
    Well, I don’t know how to do.
    If I call particleSystem.dispose() all the particles are deleted, and it’s not what I want.
    I should use “particleSystem.emitter.dispose()”, but this method does not exist…
    How can I do?

Many thanks!

Hey!

  1. ParticleChristmasTree | Babylon.js Playground (babylonjs.com) You were emitting too much particles (2000) with a capacity of 1000, meaning that in a second or 2 there were no room left for new particles
  2. Can you share your code with the dispose? I did not see it in your PG
2 Likes

https://playground.babylonjs.com/#IQPBS4#9

Line 86

particleSystem.stop() is probably the way to go here: https://playground.babylonjs.com/#IQPBS4#10

2 Likes