mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-15 23:04:30 +00:00
move the mutex lock to include the 'getNewManifold', dealing with Issue #4117
This commit is contained in:
@@ -902,8 +902,8 @@ void btDiscreteDynamicsWorld::createPredictiveContactsInternal(btRigidBody** bod
|
||||
btVector3 distVec = (predictedTrans.getOrigin() - body->getWorldTransform().getOrigin()) * sweepResults.m_closestHitFraction;
|
||||
btScalar distance = distVec.dot(-sweepResults.m_hitNormalWorld);
|
||||
|
||||
btPersistentManifold* manifold = m_dispatcher1->getNewManifold(body, sweepResults.m_hitCollisionObject);
|
||||
btMutexLock(&m_predictiveManifoldsMutex);
|
||||
btPersistentManifold* manifold = m_dispatcher1->getNewManifold(body, sweepResults.m_hitCollisionObject);
|
||||
m_predictiveManifolds.push_back(manifold);
|
||||
btMutexUnlock(&m_predictiveManifoldsMutex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user