From c5a5f8c5d465ac8d1e7f4fd36a41d83c218853a0 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 11 Jul 2014 10:54:16 -0700 Subject: [PATCH] bug fix: bad logic in capsule-vs-capsule --- libraries/shared/src/ShapeCollider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/ShapeCollider.cpp b/libraries/shared/src/ShapeCollider.cpp index ffb51660e2..03c275d987 100644 --- a/libraries/shared/src/ShapeCollider.cpp +++ b/libraries/shared/src/ShapeCollider.cpp @@ -364,12 +364,12 @@ bool capsuleCapsule(const CapsuleShape* capsuleA, const CapsuleShape* capsuleB, // clamp the distances to the ends of the capsule line segments float absDistanceA = fabs(distanceA); - if (absDistanceA > capsuleA->getHalfHeight() + capsuleA->getRadius()) { + if (absDistanceA > capsuleA->getHalfHeight()) { float signA = distanceA < 0.0f ? -1.0f : 1.0f; distanceA = signA * capsuleA->getHalfHeight(); } float absDistanceB = fabs(distanceB); - if (absDistanceB > capsuleB->getHalfHeight() + capsuleB->getRadius()) { + if (absDistanceB > capsuleB->getHalfHeight()) { float signB = distanceB < 0.0f ? -1.0f : 1.0f; distanceB = signB * capsuleB->getHalfHeight(); }