Collider:applyForce

Edit

Applies a force to the Collider.





Apply a force at the center of mass.

Arguments

NameTypeDescription
xnumber The x component of the world-space force vector, in newtons.
ynumber The y component of the world-space force vector, in newtons.
znumber The z component of the world-space force vector, in newtons.

Returns

Nothing

Apply a force at a custom position.

Arguments

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

Returns

Nothing

Apply a force at the center of mass, using vector types.

Arguments

NameTypeDescription
forceVec3 The world-space force vector, in newtons.

Returns

Nothing

Apply a force at a custom position, using vector types.

Arguments

NameTypeDescription
forceVec3 The world-space force vector, in newtons.
positionVec3 The position to apply the force at, in world space.

Returns

Nothing

Notes

Kinematic colliders ignore forces.

If the Collider is asleep, this will wake it up.

Forces are accumulated and processed during World:update.

See also