mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
fixed issue with Body.applyForce torque, closes #64
This commit is contained in:
parent
b79ece2532
commit
3f9364c240
1 changed files with 1 additions and 1 deletions
|
@ -581,7 +581,7 @@ var Axes = require('../geometry/Axes');
|
|||
body.force.x += force.x;
|
||||
body.force.y += force.y;
|
||||
var offset = { x: position.x - body.position.x, y: position.y - body.position.y };
|
||||
body.torque += (offset.x * force.y - offset.y * force.x) * body.inverseInertia;
|
||||
body.torque += offset.x * force.y - offset.y * force.x;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue