Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I decided on using OBB as the main collision detection in my 3D game but I started to wonder how OBB can be used to detect collisions if a player is in a building, an object you can walk into. Should the building object be broken up into dozens of OBBs or is there like an OBB to mesh check I can do. Or maybe there's some other better way of doing this.

Thanks for the help guys.

share|improve this question
up vote 2 down vote accepted

Split the building into more basic forms (walls, platforms, etc.) and also create a bounding box for the whole building. So, unless your tested object collides with the bounding box, you ignore everything being inside. Depending on the complexity you can group this even further, e.g. by building, by floor, by room, etc. Once you're sure you're indeed colliding with something small, like a char or table, you can check the actual faces of the object to determine collisions.

This way you can ensure lots of details (like windows or gaps you can shoot through) while still keeping the overall complexity of most comparisons low.

share|improve this answer
Thanks! Sounds easy enough. – Sh00pus Apr 23 '13 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.