Sign in to follow this  
SweetToothKane

Is SAT the best method for OBB collision testing?

Recommended Posts

Or is there another method to test the collision of two OBBs? There are plenty of resources for SAT but I don't know if that is the way I want to go. So out of curiosity I am just wondering if there is ANYTHING else out there, if so what is it and resources would be great so I could make a decision.

Share this post


Link to post
Share on other sites
Is this a good implementation?
http://www.ziggyware.com/readarticle.php?article_id=13

And based on that am I to understand that the "bounds" are the distance from the center of the OBB to each edge based on its three own axis (i.e. length, width, height but half of those since it's from the center)? If I am way off base on that let me know, so I don't go implementing this the completely wrong way because of this one article.

I do have some of oliii's code opened and am going to take a look at that and see if I understand it any more.

Share this post


Link to post
Share on other sites
Quote:
Original post by SweetToothKane
Is this a good implementation?
http://www.ziggyware.com/readarticle.php?article_id=13
A quick glance suggests that it's a more or less standard implementation of the OBB test. It doesn't look like there's any check for degenerate cross products (unless I missed it), in which case the test may occasionally return erroneous results.
Quote:
And based on that am I to understand that the "bounds" are the distance from the center of the OBB to each edge based on its three own axis (i.e. length, width, height but half of those since it's from the center)? If I am way off base on that let me know, so I don't go implementing this the completely wrong way because of this one article.
No, that's about right. To restate it, the extents (sometimes called the half-extents) are half of the box's dimensions in each direction. So if the box is 20 units in size along its own x axes, then its x extent is 10.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this