Collider:applyLinearImpulse
EditApplies a linear impulse to the Collider.
An impulse is a single instantaneous push. Impulses are independent of time, and are meant to only be applied once. Use Collider:applyForce for a time-dependent push that happens over multiple frames.
Apply an impulse at the center of mass.
Arguments
| Name | Type | Description |
| x | number | The x component of the world-space impulse vector, in newton seconds. |
| y | number | The y component of the world-space impulse vector, in newton seconds. |
| z | number | The z component of the world-space impulse vector, in newton seconds. |
Returns
Nothing
Apply an impulse at a custom position.
Arguments
| Name | Type | Description |
| x | number | The x component of the world-space impulse vector, in newton seconds. |
| y | number | The y component of the world-space impulse vector, in newton seconds. |
| z | number | The z component of the world-space impulse vector, in newton seconds. |
| px | number | The x position to apply the impulse at, in world space. |
| py | number | The y position to apply the impulse at, in world space. |
| pz | number | The z position to apply the impulse at, in world space. |
Returns
Nothing
Apply an impulse at the center of mass, using vector types.
Arguments
| Name | Type | Description |
| impulse | vector | The world-space impulse vector, in newton seconds. |
Returns
Nothing
Apply an impulse at a custom position, using vector types.
Arguments
| Name | Type | Description |
| impulse | vector | The world-space impulse vector, in newton seconds. |
| position | vector | The position to apply the impulse at, in world space. |
Returns
Nothing
Notes
Kinematic colliders ignore forces.
If the Collider is asleep, this will wake it up.
Impulses are accumulated and processed during World:update.