ApplyEntityForce

From OxeyeWiki

Revision as of 12:43, 7 February 2010 by Jeb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

physics:applyEntityForce(entityId, positionX, positionY, forceX, forceY)

Applies a force at a given world position on a given entity.

Parameter Expected Type Description
enitityId An integer The entity's body identifier.
positionX A number World X position where the force should be applied, measured in meters.
positionY A number World Y position where the force should be applied, measured in meters.
forceX A number Amount of horizontal force to be applied, measured in Newton.
forceY A number Amount of vertical force to be applied, measured in Newton.
Returns

Returns nothing.

Daisymoon Physics Lib


Example


   physics:applyEntityForce(player.body, fan.x * physResolution, fan.y * physResolution, fan.force.x, fan.force.y)

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox