AABB - AABB Collision, which face do I hit?
- by PeeS
To allow my objects to slide when they collide, I need to :
Know which face of the AABB they collide with.
Calculate the normal to that face.
Return the normal and calculate the impulse that to apply to the player's velocity.
Question
How can I calculate which face of the AABB I collided with, knowing that I have two AABB's colliding? One is the player and the other is a world object.
Here's what that looks like (problem collision circled in white):
Thank you for your help.