Simple Sphere-Sphere intersection test #227
-
Hello, P.S. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
While using bepuphysics2 to do something like this is possible, it'll feel a bit like using an industrial excavator for casual gardening. It's meant to do much harder things in very large numbers, so the API isn't well suited to this kind of simplicity. Instead, consider something like: var radiusSum = sphereRadiusA + sphereRadiusB;
var squaredRadiusSum = radiusSum * radiusSum;
if (Vector3.DistanceSquared(spherePositionA, spherePositionB) < squaredRadiusSum) { ... } |
Beta Was this translation helpful? Give feedback.
While using bepuphysics2 to do something like this is possible, it'll feel a bit like using an industrial excavator for casual gardening. It's meant to do much harder things in very large numbers, so the API isn't well suited to this kind of simplicity.
Instead, consider something like: