Propagate the allowed penetration through convex cast against a triangle mesh.

Thanks for the report and patch to Paul Dubois, Issue 451
This commit is contained in:
erwin.coumans
2010-11-18 00:25:04 +00:00
parent c49927b4ed
commit 98d902b7c1
3 changed files with 8 additions and 3 deletions

View File

@@ -576,6 +576,7 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt
BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,triangleMesh, colObjWorldTransform);
tccb.m_hitFraction = resultCallback.m_closestHitFraction;
tccb.m_allowedPenetration = allowedPenetration;
btVector3 boxMinLocal, boxMaxLocal;
castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);
triangleMesh->performConvexcast(&tccb,convexFromLocal,convexToLocal,boxMinLocal, boxMaxLocal);
@@ -632,6 +633,7 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt
BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,concaveShape, colObjWorldTransform);
tccb.m_hitFraction = resultCallback.m_closestHitFraction;
tccb.m_allowedPenetration = allowedPenetration;
btVector3 boxMinLocal, boxMaxLocal;
castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);