• Advertisement
Sign in to follow this  

Bounding Box Collision

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone. I just implemented a collision detection system that make my character walk on a map using a sphere as a bounding volume. Now i want to try to do the same thing using a box instead of a sphere, but i have no idea on how to do this! Someone can help me ?? a starting help is pleasant!

Share this post


Link to post
Share on other sites
Advertisement
bounding volume against what? Doing intersections or swept tests?

http://www.realtimerendering.com/int/

that's for intersections.


Share this post


Link to post
Share on other sites
Quote:
Original post by ludo8x
Now i want to try to do the same thing using a box instead of a sphere, but i have no idea on how to do this!


You should probably google for AABB (which stands for Axially Alligned Bounding Box). You'll see that collision tests are a little more complex than it is in case of sphere but it still remains pretty simple thing to do.

Share this post


Link to post
Share on other sites
I want to "walk" on a map, so i'll have to calculate collision, sliding vector, ecc (using a bounding box)

Share this post


Link to post
Share on other sites
slide collisions with boxes it is, then :)

It's not gonna be easy though.

One of the methods, that I use, is using the separating axis theorem.

http://www.magic-software.com/Documentation/MethodOfSeparatingAxes.pdf
http://www.magic-software.com/Documentation/DynamicCollisionDetection.pdf
http://www.magic-software.com/Documentation/IntersectionRotatingBoxes.pdf

the test in static is easy (the first doc). Going into sliding motion is more complex, but feasable. I've made a small demo-tutorial based on that stuff. The principle is the same, but the execution is diferent. Maybe it can help you too.

http://www.gamedev.net/community/forums/topic.asp?topic_id=251638

it's in 2D, but can be easily extended in 3D.

THere are mybe some other solutions, like tracing vertices of the box against the triangles, and tracing vertices of the triangle back towards the box's faces, and tracing edges against each other, but that's a lot of maths, and not as reliable.

Anyway, hope that helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement