A little more help on aabb

Started by
10 comments, last by Codejoy 19 years, 7 months ago
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.
Advertisement
Bricks aren't moving. And is that divide the x and y components by the width and height of the box respectively ? (x by width, y by height)

OH and whats a collision normal in this case? the normal from each side of the brick?

This topic is closed to new replies.

Advertisement