This project has moved and is read-only. For the latest updates, please go here.

Total force and torque action on a body

Topics: Developer Forum, User Forum
Jun 10, 2011 at 7:49 PM

Is there a way to find out how much total force and torque has been applied to a body.

I have a simulation which applies forces to a body, at given positions.  I would like to find out how much force and torque has been applied to each body.

I know I could recalculate the force sum and torque as they are being applied, but it seem a waste of computation since the engine is already calculating this as part of it's internal calculations.

Is there any way to access these internal results?????

In short what I would like to get is the equilvent of:

                Force += force;
                Torque += (point.X - Sweep.C.X) * force.Y - (point.Y - Sweep.C.Y) * force.X;
in: FarseerPhysics.Dynamics.Body (in ApplyForce(ref Vector2 force, ref Vector2 point))

Thanks in advance,

Jim K.