mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-31 18:14:55 -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
|
// get current separation between body edges involved in collision
|
||||||
pair.separation =
|
pair.separation =
|
||||||
normal.x * (bodyB.positionImpulse.x + collision.penetration.x - bodyA.positionImpulse.x)
|
collision.depth + normal.x * (bodyB.positionImpulse.x - bodyA.positionImpulse.x)
|
||||||
+ normal.y * (bodyB.positionImpulse.y + collision.penetration.y - bodyA.positionImpulse.y);
|
+ normal.y * (bodyB.positionImpulse.y - bodyA.positionImpulse.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pairsLength; i++) {
|
for (i = 0; i < pairsLength; i++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue