Currently it's possible to fast-forward the entire ParticleSystem using ParticleSystem.Simulate, is there a way to do the same thing for a specific particle rather than the whole system? Closest things I could find were ParticleSystemJobData.aliveTimePercent and ParticleSystemJobData.inverseStartLifetimes, since those are percentages I don't know how would they work to fast-forward by a certain amount of seconds (eg: 2 seconds)
#Is there a way to fast forward individual particles using Unity's Particle System
1 messages · Page 1 of 1 (latest)
Hey! There isn't a simple way that will work for all use cases, but, depending on how your particle systems are configured, there may be a way to do it. Here are some possibilities:
- if your system has a fixed random seed, and spawns particles but doesn't kill them, then you could call GetParticles() to retrieve all particles, then Simulate the whole system up to the target position, then call GetParticles() again to retrieve only the desired particle, overwrite it in the first array then call SetParticles() to set the original array, but with the modified particle.
however if your system kills particles (eg lifetime not infinite) then the array order can get mixed up and you wouldnt know which particle to copy from/to.
- i did have a second idea but i just checked the source code and it wouldn't work.....
regarding those values being percentages... 1.0f / invStartLifetime gives you the full life in seconds. so you can say aliveTimePercent = desiredTime / invStartLifetime but it won't force the simulation to fast-forward, unfortunately.
Would this also work for particles that have subparticles?
@bleak python 👀