From 7ef4eab189dc871d60b72b8a8df2ea4d99317d81 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Wed, 7 Nov 2007 13:39:05 +0000 Subject: [PATCH] use better tolerance, instead of hard-coded 0.0001 inside the btMultiSphereShape supporting vector implementation. Thanks to Phil Knight for reporting and fixing this issue (it could lead to failing collisions under certain conditions). --- src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp b/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp index a8ce8622f..c709205ef 100644 --- a/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp +++ b/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp @@ -47,7 +47,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons btVector3 vec = vec0; btScalar lenSqr = vec.length2(); - if (lenSqr < btScalar(0.0001)) + if (lenSqr < (SIMD_EPSILON*SIMD_EPSILON)) { vec.setValue(1,0,0); } else