Hello, so I have a Capsule rigidbody with collider working as the PC and im trying to detect collisions with walls and other things on a specific layer. I checked that the test wall has a collider (box collider) set to the right layer (water for now, no reason) and that neither of them are set to isKinematic or isTrigger in the editor. When i was debugging, OnCollisionEnter would send a debug message when I hit the wall, and i even checked the layer mask this way and it returned the correct layer. But when i did this:
OnCollisionEnter(Collision collision)
{
if(collision.gameObject.layer == mask )
{
Debug.Log(collision.gameObject.layer);
}
}
I no longer get the debug message. Idk why and ive tried just about every other fix i could find so some extra opinions would be much appreciated, thanks. *also i checked the mask variable on my player controller and its set to the right mask **also,also, the function im trying to put in place of the debug message puts the player into isKinematic to move it to a ledge location but the wall stays normal