mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-20 17:10:11 -05:00
optimised Resolver.solvePosition
This commit is contained in:
parent
c265626aad
commit
89963f77a0
1 changed files with 2 additions and 2 deletions
|
@ -79,8 +79,8 @@ var Bounds = require('../geometry/Bounds');
|
|||
|
||||
// get current separation between body edges involved in collision
|
||||
pair.separation =
|
||||
normal.x * (bodyB.positionImpulse.x + collision.penetration.x - bodyA.positionImpulse.x)
|
||||
+ 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);
|
||||
}
|
||||
|
||||
for (i = 0; i < pairsLength; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue