# OBB vs OBB sweep test

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

## Recommended Posts

Hi I'm trying to forge an algorithm which i don't even know is possible to forge:) I hope some of you may help me to figure that out. I have to check collisions between two OBB, taking into the consideration speed of both OBB and their rotation speed. The algorithm has to return the fact that there was a collision, and if, the point of the collision. I have search the net for hours, and i found out that every one is using simpler sweep tests (circle vs circle, ABB vs ABB) or SAT test. The implementation of SAT test i have seen is not satisfactory to me because it uses static collision check with sampling to mimic a sweep test. I can't afford the CPU for several collision checks in one frame. I also can't afford to run the collisions on simpler primitives (like circle or ABB) put in collision trees. I have very little CPU to spare on everything to be honest, because the collisions will be checked on a Nintendo DS machine. [Edited by - Hacy on November 22, 2007 3:38:33 PM]

##### Share on other sites
I doubt you are going to find anything faster than some bounding sphere sweep and sampling of rotations of the OBBs, but I guess it would depend on your scene...

but maybe this can be of help? http://www.geometrictools.com/Documentation/IntersectionRotatingBoxes.pdf

##### Share on other sites
I think the link rollo posted explains why it is so hard to find examples of rotating OBB intersection tests. For real time simulation, it is usually enough to ignore the rotational component while moving an OBB and just do a sweep test without rotation, and possibly fudge the collision response a bit. The user can't see the movement of the objects between simulation steps, so it is difficult to tell that the collision isn't that accurate.

##### Share on other sites
Thank you very much for a quick reply. I will try to implement the algorithm from the web site rollo has provided. If i fail, i will simply make ABB vs ABB sweep tests and if the will return true i will sample OBB collisions encapsulated in those ABB and pray the CPU will manage:)

[Edited by - Hacy on November 22, 2007 4:48:38 PM]

##### Share on other sites
Just using swept (linear) test is a lot easier than doing a continuous (linear and angular) test. The OBB swept test isn't hard to implement, so you do not have to approximate to AABBs or spheres if you want good accuracy, and if your objects rotate relatively slowly.

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631785
• Total Posts
3002348
×