Urgh, What I would do is...
Get the vector from the center of the box to the ball.
Divide the x and y components by the width and height of the box.
Then dot it with each collision normal.
The dot with the greatest value means that the ball collided on that side...
Probably not be the best way, but it seems okay and is relativly easy to understand / implement.
A little more help on aabb
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement