Fix src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
See Issue 643, thanks to Laurent at liquiddragon for the patch. Fix warning, See Issue 655
This commit is contained in:
@@ -132,7 +132,7 @@ bool btSphereBoxCollisionAlgorithm::getSphereDistance(const btCollisionObjectWra
|
||||
btScalar distance;
|
||||
|
||||
//special case if the sphere center is inside the box
|
||||
if (dist2 == 0.0f)
|
||||
if (dist2 <= SIMD_EPSILON)
|
||||
{
|
||||
distance = -getSpherePenetration(boxHalfExtent, sphereRelPos, closestPoint, normal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user