From 63dc666bf6ca2aa4d259d1d290bb735df63a4972 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Wed, 23 Jan 2008 02:42:14 +0000 Subject: [PATCH] fix for static planeshape and spheres, need to use the getSupportingVertex with margin for proper contact point location. --- .../CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp b/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp index 5b16a5e7e..c8b4e007a 100644 --- a/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp +++ b/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp @@ -71,9 +71,9 @@ void btConvexPlaneCollisionAlgorithm::processCollision (btCollisionObject* body0 btTransform convexInPlaneTrans; convexInPlaneTrans= planeObj->getWorldTransform().inverse() * convexObj->getWorldTransform(); - btVector3 vtx = convexShape->localGetSupportingVertexWithoutMargin(planeInConvex.getBasis()*-planeNormal); + btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis()*-planeNormal); btVector3 vtxInPlane = convexInPlaneTrans(vtx); - btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant) - convexShape->getMargin(); + btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant); btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal; btVector3 vtxInPlaneWorld = planeObj->getWorldTransform() * vtxInPlaneProjected;