Merge pull request #1798 from erwincoumans/master

Change constraint solver threshold-based termination condition on res…
This commit is contained in:
erwincoumans
2018-07-22 12:28:32 +02:00
committed by GitHub
4 changed files with 37 additions and 32 deletions

View File

@@ -274,7 +274,8 @@ btScalar btMultiBodyConstraintSolver::resolveSingleConstraintRowGeneric(const bt
{
bodyB->internalApplyImpulse(c.m_contactNormal2*bodyB->internalGetInvMass(), c.m_angularComponentB, deltaImpulse);
}
return deltaImpulse;
btScalar deltaVel =deltaImpulse/c.m_jacDiagABInv;
return deltaVel;
}
@@ -453,7 +454,8 @@ btScalar btMultiBodyConstraintSolver::resolveConeFrictionConstraintRows(const bt
bodyB->internalApplyImpulse(cB.m_contactNormal2*bodyB->internalGetInvMass(),cB.m_angularComponentB,deltaImpulseB);
}
return deltaImpulseA+deltaImpulseB;
btScalar deltaVel =deltaImpulseA/cA.m_jacDiagABInv+deltaImpulseB/cB.m_jacDiagABInv;
return deltaVel;
}