Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kieren_j

How about "bounding ellipsoilad spheres"? :P

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

Hi, I just had a good idea that''s as easy as bounding spheres but 3 times more accurate...how about bounding spheres, but instead of a single radius, it''s scaled to fit the max x,y,z bounding box (like an ellipse, except in 3d). I''m not sure how I''d test for this, would this work: [pre] xdist = abs(object1.x - object2.x); ydist = abs(object1.y - object2.y); zdist = abs(object1.z - object2.z); abx = sqrt((xdist*xdist)+(ydist*ydist)); aby = sqrt((xdist*xdist)+(zdist*zdist)); adz = sqrt((ydist*ydist)+(xdist*xdist)); if ( (abx < (object1.xsize + object2.xsize)) && (aby < (object1.ysize + object2.ysize)) && (abz < (object1.zsize + object2.zsize)) && { // collision } else { // no collision } [/pre] I''m pretty much 103% sure that this will not work. Any other ideas behind the math? thx --------------- kieren_j ÿDesigned for Win32

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!