Jump to content
Site Stability Read more... ×
• Advertisement

# Bounding Box Collision

This topic is 5524 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

##### 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

##### Share on other sites
Quote:
 Original post by ludo8xNow 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

##### 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

##### 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

##### Share on other sites

• Advertisement
• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• Advertisement

• ### Popular Now

• 15
• 21
• 23
• 11
• 25
• Advertisement
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!