# Point to OBB coordinate frame

This topic is 3765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Heya, I'm trying to do a very simple check to see if a point is inside an OBB. I'd like to transform the point into the OBB's space and do a simple AABB collision check on it. However, I cannot seem to get the transformation into the OBB's space correct. I have the OBB's extents, rotation matrix and center point, which I'm pretty sure is enough information to do this, but I just can't figure out what I'm doing wrong. Any help would be greatly appreciated. :)

##### Share on other sites
Take your point P in world space, subtract from it the center of the OBB in world space. Multiply this resulting point by the transpose of the OBB's 3x3 world rotation matrix. Now divide (component-wise) the point by the OBB's half-extents. You should now be able to test the point's components for whether they're in [-1,+1]; if any of them are not, it's not in the OBB...

...I think :)

• 17
• 11
• 12
• 9
• 49
• ### Forum Statistics

• Total Topics
631393
• Total Posts
2999757
×