intersectsSphere method

bool intersectsSphere(
  1. Sphere sphere
)

Implementation

bool intersectsSphere(Sphere sphere) {
  final radiusSum = radius + sphere.radius;
  return sphere.position.distanceToSquared(position) <= (radiusSum * radiusSum);
}