We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c265626 commit 89963f7Copy full SHA for 89963f7
src/collision/Resolver.js
@@ -79,8 +79,8 @@ var Bounds = require('../geometry/Bounds');
79
80
// get current separation between body edges involved in collision
81
pair.separation =
82
- normal.x * (bodyB.positionImpulse.x + collision.penetration.x - bodyA.positionImpulse.x)
83
- + normal.y * (bodyB.positionImpulse.y + collision.penetration.y - bodyA.positionImpulse.y);
+ collision.depth + normal.x * (bodyB.positionImpulse.x - bodyA.positionImpulse.x)
+ + normal.y * (bodyB.positionImpulse.y - bodyA.positionImpulse.y);
84
}
85
86
for (i = 0; i < pairsLength; i++) {
0 commit comments