aWeirdo Posted May 25, 2016 Share Posted May 25, 2016 Hi all, Looking to gradually "scale" down particles in a particle system as they start dying, Is it possible to look at each active particle in the system (like in a for..loop in registerBeforeRender) and see if they have started dying? is there a flag or value for that? EDIT: Nevermind this topic, i found what i needed.. particleSystem.particles cointains an array for each particle which then contains age & lifetime values which can do the trick Cheers Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted May 25, 2016 Share Posted May 25, 2016 What actually happens when the particle has reached end of life? Is it removed the the particle array? Or is the alpha set to 0? I ask because I want to know what the long term effects of having lots of particles around. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted May 25, 2016 Author Share Posted May 25, 2016 I believe they get recycled and then disposed if / when the particle system does. This is ofc the particleSystem and not the Solid particleSystem, https://doc.babylonjs.com/tutorials/Particles i know you have been working with the SPS, so i just wanted to make sure we were on the same page Quote Link to comment Share on other sites More sharing options...
jerome Posted May 26, 2016 Share Posted May 26, 2016 In the standard particle system (not the SPS) the recycled particles are stored in a pool array Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.