Advertisement

Formula Sheet for Sphere - Sphere Collision Detection

Started by July 31, 2021 11:47 PM
1 comment, last by hplus0603 3 years, 4 months ago

Does anyone know the formula for Sphere - Sphere Collision Detection, I'm am trying to find out how to do Sphere - Sphere Collision for a Physics Engine. If anyone knows the formulas for SphereSphereDetection and SphereSphereCollisionResponse, they can leave it in the comments.

Wikipedia knows, I imagine!

Although sphere/sphere is the simple one – it's the same as point-sphere where the radius of the second sphere is the sum of the radius of the two spheres, and THAT is in turn just a distance function, or even a distance squared function. Just plug Pythagoras between the two center points in, and check whether the square of that 3D hypothenuse is greater or smaller than the square of the sum of the sphere radii.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement