Alright, so I've been converting my project from using 3D colliders to 2D colliders and have run into a strange issue.
I have a basic tilemap painted with a tag called Ground that uses the 2D edge colliders when the game is run. The player character has a 2D rigidbody and a 2D box collider on it, and in the player's script I have the following collision code -
void onCollisionEnter2D(Collision2D collision)
{
if(collision.collider.tag == "Ground") _isGrounded = true;
print("COLLISION DETECTED");
}
void onCollisionExit2D(Collision2D collision)
{
if(collision.collider.tag == "Ground") _isGrounded = false;
}
When the player character collides with the tilemap, it works as expected and I can move the player around with no problem. But no matter what I do it will not detect the collision and change _isGrounded to true or print out any values. I never had a problem getting this working with the 3D colliders...
Am I missing something?