From 2ee866e37fb196a4f763f2b29d6bbb6d4f86fe15 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Tue, 8 Apr 2008 22:28:02 +0000 Subject: [PATCH] fix in partId/triangleId, thanks Alex --- .../src/Bullet/btGImpactCollisionAlgorithm.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp index 1ec080547..fd6ac20cf 100755 --- a/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp +++ b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp @@ -783,8 +783,16 @@ public: { btTriangleShapeEx tri1(triangle[0],triangle[1],triangle[2]); tri1.setMargin(margin); - algorithm->setPart1(partId); - algorithm->setFace1(triangleIndex); + if(swapped) + { + algorithm->setPart0(partId); + algorithm->setFace0(triangleIndex); + } + else + { + algorithm->setPart1(partId); + algorithm->setFace1(triangleIndex); + } algorithm->gimpact_vs_shape( body0,body1,gimpactshape0,&tri1,swapped); }