Set Particle lifetime by distance, not time?

It seems like particle lifetime is time dependent. Is there a way to kill a particle after it has traveled X meters? I want to use particles to represent information travelling between nodes. The nodes could be any distance apart and I want the particle to die when it reaches its destination, however I don’t want to use collisions for this id possible.

Thanks, I’d need multiple objects though if I needed 25 nodes to be simultaneously transmitting particles.

I have a single particle system which handles unlimited nodes emitting particles, and it’s fine apart from one thing - the particles sometimes overshoot the receiver nodes - because their lifespan is determined by time, not by distance.

I know the positions, etc of everything. But I’m not sure how to tell a particle to die after 25 meters.

I could use OnParticleCollision() but it would be far simpler if I could just tell each particle to die after X meters. I was thinking if I know how fast they move, I could work out the time it will take a particle to travel X meters and set the lifetime accordingly. But I can’t find in the docs what particle speed is (i.e. if it’s measured in meters per second)…

This seems to work:

Emitter.startLifetime = Vector3.Distance(Emitter.transform.position,target.position)/Emitter.startSpeed;

@Recluse thanks! still saving my and other lives in the 2020’s :smiley: