I’m making a 3d platformer game and I managed to code a double jump that kind of works, I’m using OnCollisionEnter and OnCollisionStay to determine if my character is grounded, it works alright but the problem is that if my character hits the ceiling with its head or the walls with any of the sides of its collider my code automatically assumes the character is grounded and allows it to jump indefinitely!
is there any way to make the OnCollisionEnter and OnCollisionStay functions to detect when it’s colliding with only the lower part of my character’s collider?
Thanks!