0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

fixed issue with Body.applyForce torque, closes #64

This commit is contained in:
liabru 2015-12-23 13:41:11 +00:00
parent b79ece2532
commit 3f9364c240

View file

@ -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;
};
/**