Get Height of Particle System

Morning,

I’m making an obstacle system. I have a float inactive height and a float active height for the resting / active height the obstacle will move to during animation. This works for every obstacle except the ones involving a particle system, as there’s no actual height field for the particle system.

How can you calculate the height (in world space) of the particle system?

You can get all the particles in the particle system using particlesystem.GetParticles. This gives you an array of Particle objects, each of which has a position.

If you get the list of particles, run over each of their positions and calculate the highest and lowest y coordinate, then the height is highest-lowest.

Is that what you’re after?