Skip to content

Commit 24b96b1

Browse files
committed
Significantly reduce jittering of resting bodies. Thanks to Daniel Chappuis for pointing this out.
Signed-off-by: Aleksi Sapon <[email protected]>
1 parent 8affd32 commit 24b96b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/spout/physics/engine/ContactSolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ private void initializeContactConstraints() {
365365
}
366366
contactPoint.restitutionBias = 0;
367367
final float deltaVDotN = deltaV.dot(contactPoint.normal);
368-
if (deltaVDotN < ReactDefaults.RESTITUTION_VELOCITY_THRESHOLD) {
368+
if (deltaVDotN < -ReactDefaults.RESTITUTION_VELOCITY_THRESHOLD) {
369369
contactPoint.restitutionBias = manifold.restitutionFactor * deltaVDotN;
370370
}
371371
if (WARM_STARTING_ACTIVE) {

0 commit comments

Comments
 (0)