set broadphase handle to zero when destructing a btCollisionWorld, just in case a collision object/ rigid body is re-used.
Thanks to Ole for reporting Fix a bug , causing some deep penetrations to be missed. Not likely to have impacted many users, as such deep penetrations should have prevented in the first place. Thanks a lot to Andy O'Neil for reporting and reproduction case.
This commit is contained in:
@@ -69,6 +69,7 @@ btCollisionWorld::~btCollisionWorld()
|
|||||||
//
|
//
|
||||||
getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1);
|
getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1);
|
||||||
getBroadphase()->destroyProxy(bp,m_dispatcher1);
|
getBroadphase()->destroyProxy(bp,m_dispatcher1);
|
||||||
|
collisionObject->setBroadphaseHandle(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result&
|
|||||||
// potential exit, they don't overlap
|
// potential exit, they don't overlap
|
||||||
if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared))
|
if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared))
|
||||||
{
|
{
|
||||||
checkPenetration = false;
|
checkSimplex=true;
|
||||||
|
//checkPenetration = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user