- Home /
Absolute Particle Scaling
Hey everyone -
I wish to scale all particles of a particle system uniformly, regardless of camera distance, but based on another variable which I have in one of my scripts.
That is, when this variable (ranged 0 -1) is a 1, I would like all particles to be at their maximum size, and when the variable is 0, I would like all particles to be at their minimum size.
This cannot be accomplished with minParticleSize and maxParticleSize, as these parameters of the ParticleSystemRenderer represent percent-screen-space. Changing those variables will not effect all particles in the same, absolute way that I need them to be effected.
In the Particle scripting API documentation, the only hook into the particle size appears to be startSize, which unfortunately does not effect the size of a particle that has already been generated.
My logic is all in place, I just need to know how to take control of the particle's size, post-generation.
Thanks for the help!
Have you tried enabling Size over Lifetime on your Particle System, to then in code adjust the curve? This should give you the needed post-generation sizing (at least it does when trying out in the Particle System live editor). Good luck!