• ### What is your GameDev Story?

#### Archived

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

This topic is 6716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
IIRC there was tutorial on flipcode about collision detection using ellipsoids? a couple of months ago

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 9
• 45
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015721
×