From 60c1b1918a96be8ccd5742cf2352a49afa2d2e94 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Sun, 23 Sep 2012 18:35:19 +0000 Subject: [PATCH] fix bug for convex-convex polyhedral contact clipping, where the origin of the object is not located inside the convex hull of the vertices. --- .../NarrowPhaseCollision/btPolyhedralContactClipping.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp b/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp index 72334c6af..33a8a0639 100644 --- a/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp +++ b/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp @@ -276,8 +276,7 @@ bool btPolyhedralContactClipping::findSeparatingAxis( const btConvexPolyhedron& } - const btVector3 deltaC = transB.getOrigin() - transA.getOrigin(); - if((deltaC.dot(sep))>0.0f) + if((DeltaC2.dot(sep))>0.0f) sep = -sep; return true;