Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Particle System does not detect all the Colliding GameObjects

Discussion in 'Physics' started by ASPLADMIN, Jan 25, 2020.

  1. ASPLADMIN

    ASPLADMIN

    Joined:
    Sep 8, 2016
    Posts:
    6
    I have a ParticleSystem that has a simple script attached to it's GameObject:

    Code (CSharp):
    1. public class WaterCannonHit : MonoBehaviour
    2. {
    3.     private void OnParticleCollision(GameObject other)
    4.     {
    5.         Debug.Log(other.name);
    6.     }
    7. }
    8.  
    The Particle System is attached to a GameObject that can be pointed to any object and Particles are shot towards that object. I wish to detect the name of the hit object. But it only gives me the name of first object hit. Does not refreshes as I move on to hit other objects while particles are emitting. I am using Unity 2019.2.17.

    The Documentation Says:

    "The ParticleSystem receives at most one message per Collider that is struck."

    "per" is not working in my case. Any suggestions?
     
    Last edited: Jan 25, 2020
  2. ASPLADMIN

    ASPLADMIN

    Joined:
    Sep 8, 2016
    Posts:
    6
    [Solved].. The Particle system had multiple sub particle child game objects. "Send Collision Message" needs to be enabled on all relevant PS. o_O