From 1655463ba5d6016cff561bc868b29e069318f6bd Mon Sep 17 00:00:00 2001 From: ProfJski <49599659+ProfJski@users.noreply.github.com> Date: Wed, 8 May 2019 14:14:57 -0400 Subject: [PATCH] Update models.c --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models.c b/src/models.c index 9e534a7c..fc93c141 100644 --- a/src/models.c +++ b/src/models.c @@ -2472,7 +2472,7 @@ void DrawBoundingBox(BoundingBox box, Color color) // Detect collision between two spheres bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB) { - return Vector3DotProduct(Vector3Subtract(B,A),Vector3Subtract(B,A))<=(RadA+RadB)*(RadA+RadB); + return Vector3DotProduct(Vector3Subtract(centerB,centerA),Vector3Subtract(centerB,centerA))<=(radiusA+radiusB)*(radiusA+radiusB); } // Detect collision between two boxes