ParticleSystem.Particle does not get individual particle positions???

I’m instantiating multiple particles with a single particle system and the particles are moving through the gameworld via the “start speed” parameter of the particle system. I’m trying to get the positions of the particles as they travel:

part = GetComponent<ParticleSystem>();

ParticleSystem.Particle[] particles = new ParticleSystem.Particle[part.particleCount];
        for(int i = 0; i < particles.Length; i++)
        {
            print(particles[i].position);
            print(transform.TransformPoint(particles[i].position));
        }

The issue is that the positions this returns are always the launchpoint position from where the particle system is positioned and is the same value for every single particle, despite the fact that each particle is in a different location in the gameworld. I don’t understand why this returns the particle system position when I can just get the particle system transform position directly. Is there any way to get actual particle positions in world space?

Nvm just figured it out I wasn’t using Getparticles();

New Code:

ParticleSystem.Particle[] particles = new ParticleSystem.Particle[part.particleCount];
        int n = part.GetParticles(particles);
        for (int i = 0; i < n; i++)
        {
            print(particles[i].position);
        }
3 Likes