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. Dismiss Notice

Triggers wont see some colliders

Discussion in 'Physics' started by Feretro, Nov 23, 2020.

  1. Feretro

    Feretro

    Joined:
    Apr 18, 2017
    Posts:
    57
    Hello. I am having a problem that I can't figure out.
    ;) Despite image is "not serious" ... I am asking for real! :p

    In attached you can se well ... two objects. Both have Trigger Colliders on them. Gray Sphere detects collision with PLAYER (he is in the background) but can't detect his "pink friend" on the left.

    Why? Layers are OK!

    Code (CSharp):
    1.  private void OnTriggerEnter(Collider other)
    2.     {
    3.         Debug.Log("Collide: " + other.tag + " Name: " + other.name);
    4.     }
    what can determine this?

    Thanks
     

    Attached Files:

  2. panim0_unity

    panim0_unity

    Joined:
    Nov 13, 2018
    Posts:
    47
    is any rigidbody missing on objects?
     
  3. Feretro

    Feretro

    Joined:
    Apr 18, 2017
    Posts:
    57
    If you are asking me this ... it must means that I need a rigidbody .... Well I am going to hide myself under the ground!

    Thanks :-D Now it works! <3