Collider:setLinearVelocity

Edit

Sets 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

NameTypeDescription
vxnumber The x velocity of the Collider, in meters per second.
vynumber The y velocity of the Collider, in meters per second.
vznumber The z velocity of the Collider, in meters per second.

Returns

Nothing

Set the linear velocity of the collider using a vector.

Arguments

NameTypeDescription
velocityVec3 The velocity of the Collider, in meters per second.

Returns

Nothing

See also