Collider:applyForce

Applies a force to the Collider.


Collider:applyForce(x, y, z)

Arguments

NameTypeDescription
xnumber The x component of the force to apply.
ynumber The y component of the force to apply.
znumber The z component of the force to apply.

Returns

Nothing


Collider:applyForce(x, y, z, px, py, pz)

Arguments

NameTypeDescription
xnumber The x component of the force to apply.
ynumber The y component of the force to apply.
znumber The z component of the force to apply.
pxnumber The x position to apply the force at, in world coordinates.
pynumber The y position to apply the force at, in world coordinates.
pznumber The z position to apply the force at, in world coordinates.

Returns

Nothing

Notes

If the Collider is asleep, it will need to be woken up with Collider:setAwake for this function to have any affect.

See also