Fix friction and restitution in BulletMultiThreaded (collision detection and parallel solver)
Thanks to lsgmasa for reporting, see http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1758
This commit is contained in:
@@ -1062,15 +1062,14 @@ void processSolverTask(void* userPtr, void* lsMemory)
|
||||
};
|
||||
|
||||
btScalar penVel = -constraint.m_penetration/taskDesc.m_commandData.m_manifoldSetup.m_solverInfo.m_timeStep;
|
||||
if (rest > penVel)
|
||||
{
|
||||
rest = btScalar(0.);
|
||||
}
|
||||
constraint.m_restitution = rest;
|
||||
|
||||
constraint.m_penetration *=
|
||||
-(taskDesc.m_commandData.m_manifoldSetup.m_solverInfo.m_erp/taskDesc.m_commandData.m_manifoldSetup.m_solverInfo.m_timeStep);
|
||||
|
||||
|
||||
if (rest > penVel)
|
||||
{
|
||||
constraint.m_penetration = btScalar(0.);
|
||||
}
|
||||
constraint.m_restitution = rest;
|
||||
constraint.m_appliedImpulse = 0.f;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user