Collider:setLinearVelocity

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.

Collider:setLinearVelocity(vx, vy, vz)

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

See also