allow getClosestPoints for btCompoundCollisionAlgorithm and btSphereTriangleCollisionAlgorithm

add optional 'lightColor' arg to testrender.py script
This commit is contained in:
erwincoumans
2016-11-22 10:11:04 -08:00
parent 24c9020aac
commit 0516d2ecaa
4 changed files with 7 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &po
btScalar radiusWithThreshold = radius + contactBreakingThreshold;
btVector3 normal = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]);
normal.normalize();
normal.safeNormalize();
btVector3 p1ToCentre = sphereCenter - vertices[0];
btScalar distanceFromPlane = p1ToCentre.dot(normal);