B2.Body:applyForce

From GiderosMobile
Revision as of 23:47, 30 April 2025 by MoKaLux (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2011.6
Class: b2.Body

Description

Applies 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.

b2.Body:applyForce(forcex,forcey,pointx,pointy)

Parameters

forcex: (number) applied force on x axis
forcey: (number) applied force on y axis
pointx: (number) the x coordinate of the world position of the point of application
pointy: (number) the y coordinate of the world position of the point of application




LiquidFun