Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Destroy multiple GameObject when Particles collide

Discussion in 'Scripting' started by adria_ec, Sep 17, 2017.

  1. adria_ec

    adria_ec

    Joined:
    Sep 16, 2015
    Posts:
    6
    Hi, I'm using OnParticleCollision to detect collision between my particle system and the GameObjects I want to destroy and it works fine.

    The problem is that I've different particle systems and I would like some of them to damage and destroy more than one GameObject, but OnParticleCollision (as far as I know) only works with one GameObject.

    Is there any way to destroy all the GameObjects that collide with my particle sysyem?