public ApplyForce ( |
||
force | the world force vector, usually in Newtons (N). | |
point | the world position of the point of application. | |
return | void |
public void ApplyForce(Vec2 force, Vec2 point)
{
if (m_type != BodyType.Dynamic)
{
return;
}
if (Awake == false)
{
Awake = true;
}
// m_force.addLocal(force);
// Vec2 temp = tltemp.get();
// temp.set(point).subLocal(m_sweep.c);
// m_torque += Vec2.cross(temp, force);
Force.X += force.X;
Force.Y += force.Y;
Torque += (point.X - Sweep.C.X) * force.Y - (point.Y - Sweep.C.Y) * force.X;
}