Hello, is there an animator way to do this? Because if i add delete animator to the particleSystemSceneNode, it kill all the particles (what i want is the emitter to stop emitting and when the last particle dies, i kill the whole node).
Is it possible somehow? I searched the forum, but din't find a solution.
Thank you
"make emitter stop emitting" animator
"make emitter stop emitting" animator
Dreaming of folk-art at http://www.ambersky.cz
I suppose the following could work mostly (untested):
It won't remove the node, you would still have to do that if it's necessary as well (maybe with a timer).
edit: Or some hack - you could then add a custom IParticleAffector which would get the amount of active particles in it's affect function. So you could figure out in there if there are no particles left.
Code: Select all
particleSceneNode->getEmitter ()->setMaxParticlesPerSecond(0);
particleSceneNode->getEmitter ()->setMinParticlesPerSecond
edit: Or some hack - you could then add a custom IParticleAffector which would get the amount of active particles in it's affect function. So you could figure out in there if there are no particles left.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
what about IParticleSystemSceneNode->setEmitter(0); ?
or will that kill the particles?
or will that kill the particles?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Yes, that would work, however by the time the emmiter gets to be destroyed, whole bunch of new emitters+particleNodes are created, so it would be uncomfortable to keep track of all existing particleNodes+their emmiters, since they all would have same lifetime.. Maybe some sort of custom animator..
Dreaming of folk-art at http://www.ambersky.cz