I found the same question asked in 04’ 13 years ago with no answer. I have a bomb graphic that drops from the air. After 3 seconds it explodes ( destroy(); ) and a particle effect is created with 10 particles that have have a material attached that is shrapnal png image. This then rains down holy hell on the town below. When a particle collides with an object the delegate method is called and I want to destroy this 1 single particle.
You don’t need script for this. Enable “Collision” module in particle system and set “life loss” to 1, change the layers in “collide with” and your object to destroy the particle so the particle only collides with collider of specific layer.
I spent my whole Saturday, 8 hours so far researching this and 30 seconds after reading your answer I see the individual particles being deleted as they hit the gameObject. Thank You!
Is it possible to change the value of the particlelifetimeloss per layer, for example: on the player the particle like “destroys” immediately, but on the ground they stay a little longer?
Hello, well, I think you could use Trigger together with the Collider. So, you enable the Collision normally, but when it hits the Player, you use the Trigger module (built-in with the particle system) and tell them to kill this particle.
Is there a way of making a particle damage the player and then destroying that single Particle by using the Triggers Component and a script? And how do I even destroy a single Particle from a script?