From 1a26241fa85a5e373df004bc6ceb3a9fccd4804f Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Fri, 16 Sep 2016 20:02:38 +0200 Subject: [PATCH] Fix issue in contact solver --- src/engine/ContactSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/ContactSolver.cpp b/src/engine/ContactSolver.cpp index 4e2e0eec..a0db1119 100644 --- a/src/engine/ContactSolver.cpp +++ b/src/engine/ContactSolver.cpp @@ -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;