Particle died event
marwie opened this issue · comments
Marcel Wiessler commented
Hello,
is there a good way to get the died
state of a particle from a behaviour? How should events be implemented that happen on particle death?
My workaround for now is adding the current delta time and checking if it is above the life.
But that is quite hacky and unstable I would say :)
const willDie = particle.age + delta >= particle.life
Forrest Sun commented
Hi marwie, thanks for the suggestion. This is something we definitely want to consider. we could implement an event callback for that. I will keep you updated.
Forrest Sun commented
implemented "particleDied" event with b12ce57
use addEventListener
to listen.