Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.