Particle in collision

Is there a way how to target particle what caused collision in script attached to emitor?

void OnParticleCollision (GameObject obj) {
    //gameobject  is the emitter
    //obj is the object hitted (colided) with particle
    //but how to acces that exact particle what caused collision (and destroy it)   
}

18227-11e.png

I thought that setting lifetime loss on collision will destroy that particle but it did not. Maybe I am missing something important in order to do this right, any advice would be helpfull, thanks

I am facing the same problem. I want to avoid certain particle collision and therefor I need to know which particle actually caused the collision :(

1 Answer

1

If your end goal is to have the particles destroyed when hitting something, then you can adjust the Min Kill Speed variable to something larger than the speed the particles will ever have. The variable is right under the Lifetime Loss variable in the particle system.

I have the same problem and your solution doesn't work. :(