Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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:
    4
    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:
    4
    [Solved].. The Particle system had multiple sub particle child game objects. "Send Collision Message" needs to be enabled on all relevant PS. o_O
     
unityunity