Update models.c

This commit is contained in:
ProfJski 2019-05-08 14:14:57 -04:00 committed by GitHub
parent 4330b098f3
commit 1655463ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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