Fix issue in contact solver

This commit is contained in:
Daniel Chappuis 2016-09-16 20:02:38 +02:00
parent b4f13308de
commit 1a26241fa8

View File

@ -832,7 +832,7 @@ void ContactSolver::solvePenetrationConstraints() {
mPenetrationConstraints[i].penetrationSplitImpulse = std::max(
mPenetrationConstraints[i].penetrationSplitImpulse +
deltaLambdaSplit, decimal(0.0));
deltaLambda = mPenetrationConstraints[i].penetrationSplitImpulse - lambdaTempSplit;
deltaLambdaSplit = mPenetrationConstraints[i].penetrationSplitImpulse - lambdaTempSplit;
// Update the velocities of the body 1 by applying the impulse P=J^T * lambda
Vector3 linearImpulse = mPenetrationConstraints[i].normal * deltaLambdaSplit;