I have a player and an exit. Player - size 1 x 1: BoxCollider2D - With no trigger. Size 1x1 RigidBody2D - Dynamic Body Type. No Gravity. Collision Detection Discrete. Script on player: private void OnTriggerEnter2D (Collider2D other) { Debug.Log (other.gameObject.name); CanMove = false; //Stops player moving. } Exit - size 1 x 1: BoxCollider2D - Trigger on. Size 1 x 1 I run the game and i move the player onto the exit but it still moves. And Debug.log doesnt show. Idk what ive done wrong?
There is nothing wrong. I think some of your configuration are not set correctly. Check if you are really using 2DCollider and 2dRigidbody. Otherwise isolate the problem. If you still have the problem post the full context (of the isolate version).
yes, this code is working and check, are the messages enabled in the console (open console window and look at exclamation mark in up-right side)?