From dbc464f831f674c79adfdf69f4d0d5d4727e3afc Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Thu, 26 Jun 2008 23:52:39 +0000 Subject: [PATCH] Applied patch from Alex Silverman, to swap the partId/triangleId correctly. http://code.google.com/p/bullet/issues/detail?id=54 Thanks for the patch! --- Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp index fd6ac20cf..31b5ab0aa 100755 --- a/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp +++ b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp @@ -651,7 +651,10 @@ void btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject * body0, while(i--) { int child_index = collided_results[i]; - m_triface0 = child_index; + if(swapped) + m_triface1 = child_index; + else + m_triface0 = child_index; btCollisionShape * colshape0 = retriever0.getChildShape(child_index);