Collider:setLinearVelocity
EditSets the linear velocity of the Collider directly. Usually it's preferred to use Collider:applyForce
to change velocity since instantaneous velocity changes can lead to weird glitches.
Set the linear velocity of the collider using numbers.
Arguments
Name | Type | Description |
vx | number | The x velocity of the Collider, in meters per second. |
vy | number | The y velocity of the Collider, in meters per second. |
vz | number | The z velocity of the Collider, in meters per second. |
Returns
Nothing
Set the linear velocity of the collider using a vector.
Arguments
Name | Type | Description |
velocity | Vec3 | The velocity of the Collider, in meters per second. |
Returns
Nothing