Collider:applyForce
EditApplies a force to the Collider.
Apply a force at the center of mass.
Arguments
| Name | Type | Description |
| x | number | The x component of the world-space force vector, in newtons. |
| y | number | The y component of the world-space force vector, in newtons. |
| z | number | The z component of the world-space force vector, in newtons. |
Returns
Nothing
Apply a force at a custom position.
Arguments
| Name | Type | Description |
| x | number | The x component of the world-space force vector, in newtons. |
| y | number | The y component of the world-space force vector, in newtons. |
| z | number | The z component of the world-space force vector, in newtons. |
| px | number | The x position to apply the force at, in world space. |
| py | number | The y position to apply the force at, in world space. |
| pz | number | 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
| Name | Type | Description |
| force | Vec3 | The world-space force vector, in newtons. |
Returns
Nothing
Apply a force at a custom position, using vector types.
Arguments
| Name | Type | Description |
| force | Vec3 | The world-space force vector, in newtons. |
| position | Vec3 | 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.