/** * Apply a force at a world point. * If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. * This wakes up the body. * * @param force the world force vector, usually in Newtons (N) * @param point the world position of the point of application */ public void applyForce(Vec2 force, Vec2 point) { applyForceToCenter(force); m_torque += (point.x - m_sweep.c.x) * force.y - (point.y - m_sweep.c.y) * force.x; }
/** * Apply a force at a world point. * If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. * This wakes up the body. * * @param force the world force vector, usually in Newtons (N) * @param point the world position of the point of application */ public void applyForce(Vec2 force, Vec2 point) { applyForceToCenter(force); m_torque += (point.x - m_sweep.c.x) * force.y - (point.y - m_sweep.c.y) * force.x; }
/** * Apply a force to the center of mass. This wakes up the body. * * @param force the world force vector (in meter/sec) */ public void applyBodyForceToCenter(Vec2 force) { getBody().applyForceToCenter(force); }
/** * Apply a force to the center of mass. This wakes up the body. * * @param force the world force vector (in meter/sec) */ public void applyBodyForceToCenter(Vec2 force) { getBody().applyForceToCenter(force); }