My collisions dont detect in gridbased system (check if in certain area)
Hello
I am making this game with grid based movement. I need to check if my player is in a certain are (to win) I have been trying diffrent things like OnTriggerEnter2D and OnTriggerStay2D
This doesn't work tho. code down beneath the post. I have tried adding a rigidbody to the object. this didn't help tho.
please help
 public class winning : $$anonymous$$onoBehaviour
 {
     public bool win = false;
     void OnCollisionStay2D(Collision2D other)
     {
         Debug.Log("In there");
         if(other.gameObject.CompareTag("Winner"))
         {
             win = true;
         }
     }
 }
 
                 Do both gameobjects, the player and the target, have colliders?
2d colliders? And you use either Velocities, forces or $$anonymous$$ovePosition to move them?
Your answer
 
             Follow this Question
Related Questions
How to deadtivate a gameobjects from the scene, if player has a character controller 0 Answers
Check if collider is colliding with something,Check if a collider contains any colliding objects 0 Answers
OnTriggerEnter is not called 1 Answer
How to make gridbased movement while also using collision? 0 Answers