From 7130c4ae80f8d2c6c7c1d9243d2941600b12f86a Mon Sep 17 00:00:00 2001 From: liabru Date: Mon, 3 Jan 2022 21:30:23 +0000 Subject: [PATCH] refactor resolver friction multiplier --- src/collision/Resolver.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collision/Resolver.js b/src/collision/Resolver.js index 518604f..84edce9 100644 --- a/src/collision/Resolver.js +++ b/src/collision/Resolver.js @@ -228,8 +228,8 @@ var Bounds = require('../geometry/Bounds'); timeScaleSquared = timeScale * timeScale, timeScaleCubed = timeScaleSquared * timeScale, restingThresh = -Resolver._restingThresh * timeScale, - frictionNormalMultiplier = Resolver._frictionNormalMultiplier, restingThreshTangent = Resolver._restingThreshTangent * timeScale, + frictionNormalMultiplier = Resolver._frictionNormalMultiplier * timeScale, frictionMaxStatic = Resolver._frictionMaxStatic * timeScale, pairsLength = pairs.length, tangentImpulse, @@ -256,7 +256,7 @@ var Bounds = require('../geometry/Bounds'); contactsLength = contacts.length, contactShare = 1 / contactsLength, inverseMassTotal = bodyA.inverseMass + bodyB.inverseMass, - friction = pair.friction * pair.frictionStatic * frictionNormalMultiplier * timeScale; + friction = pair.friction * pair.frictionStatic * frictionNormalMultiplier; // update body velocities bodyAVelocity.x = bodyA.position.x - bodyA.positionPrev.x;