mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-12 12:50:08 +00:00
move the mutex lock to include the 'getNewManifold', dealing with Issue #4117
This commit is contained in:
parent
0ab3b9d9f7
commit
5d1c8a2ece
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user