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

Why can not OnTriggerEnter2D run orderly?

Discussion in 'Scripting' started by huseyinbaba58, Aug 22, 2020.

  1. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    That is making me mad. I am using onTriggerEnter2D() for hitting targets.But this method can't hit targets.
    I researched more questions. That wasn't a solution what I would like to searching solution.
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    I guess noone really knows what you really mean. Can you elaborate what you are trying to do?

    Note that it's OnTriggerEnter2D, case sensitivity is important - perhaps that's the reason why something doesn't work as expected.
     
    Kurt-Dekker and Vryken like this.
  3. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    Shortly, I marked Box Collider's IsTrigger box but Box Collider couldn't run accuraly.
    I was careful about case sensitivity but somehow Box Collider has continued to not run.
     
  4. Yanne065

    Yanne065

    Joined:
    Feb 24, 2018
    Posts:
    175
    Does it have a ridgitbody2d on it
     
  5. huseyinbaba58

    huseyinbaba58

    Joined:
    Feb 12, 2020
    Posts:
    146
    Yeah .I added Rigidbody 2D