- Home /
realizing AddTorqueAtPosition - how to calculate forces
I m trying to reconstruct Lockstep's instructions on how to realize a method "AddTorqueAtPosition" analogous to Rigidbody.AddForceAtPosition .
I m failing to induce a linear motion impulse, in the most simple test-bed scenario:
A box (4x1x1), offset about (1.5, 0, 0) from the point to be rotated around (the origin):
Using ...
rigidbody.AddForceAtPosition(new Vector3(0, 1, 0), new Vector3(0.5, 0, 0), ForceMode.Impulse);
rigidbody.AddForceAtPosition(new Vector3(0, -1, 0), new Vector3(-0.5, 0, 0), ForceMode.Impulse);
... to induce to 2 instantaneous impulses of same magnitude, but opposite direction, at two positions that are slightly offset from each other.
I expect: body starts to rotate and move
I observe: body starts to rotate
what am i missing?
(the offset obviously results in the 2 forces not cancelling each other out with respect to angular momentum induced. But shouldn't that offset likewise result in the 2 linear accelerations not cancelling each other out?)