Search Unity

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