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
vxnumberThe x velocity of the Collider, in meters per second.
vynumberThe y velocity of the Collider, in meters per second.
vznumberThe z velocity of the Collider, in meters per second.

Returns

Nothing

See also