Jump to content
  • Advertisement
Sign in to follow this  
MichaelCrook

Bounding boxes

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

I was wondering... I am currently using a half assed system for an assignment, we have to, we have no choice... I was wondering How could I make abounding boxes which are on an angle, currently the bounding box system in this world can only handle having the bounding box on the X or the Y axis, pretty much you can only:
_
|_|

you can't
_
/ - _
/_ /
- _/

Which is a problem
Could anyone link me to a tutorial on bounding boxes which can handle angles, what I was thinking was somthing where I can make a bounding box which is rotatable
maybe ill when I check for collision I will pass in Xstart, Zstart, Xend, YEnd, camLocation, angle, then make Xend, Yend and CamLocation relitive to the Xstart and Ystart (as in, Xend-Xstart) then put them into a matrix and rotate the matrix by angle and check to see if the collision is above or below Zstart between Xstart to Xend?

Share this post


Link to post
Share on other sites
Advertisement
What you want is called an object orientated bounding box.

I think this link gives an example -
http://www.3dkingdoms.com/weekly/weekly.php?a=21

But the calculation is more expensive than an axis-aligned box (which is what you have at the mo) so normally it is best to check with a sphere or the box you have at the moment before doing the more complex checks.

x

Share this post


Link to post
Share on other sites
Like monkan says,

Can't you just check for triangle vs triangle or ray vs triangle after there is a normal (axis aligned) bounding box intersection. This is pretty much standard workflow.

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!