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).
This commit is contained in:
ejcoumans
2007-11-07 13:39:05 +00:00
parent 126f46cb99
commit 7ef4eab189

View File

@@ -47,7 +47,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons
btVector3 vec = vec0; btVector3 vec = vec0;
btScalar lenSqr = vec.length2(); btScalar lenSqr = vec.length2();
if (lenSqr < btScalar(0.0001)) if (lenSqr < (SIMD_EPSILON*SIMD_EPSILON))
{ {
vec.setValue(1,0,0); vec.setValue(1,0,0);
} else } else