Vehicle Body

self:set_linear_velocity

Shared

Sets the linear velocity of the vehicle body

Syntax

local status = self:set_linear_velocity(
    velocity
)

Parameters

TypeNameDescription
vector3velocityVelocity to apply as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the linear velocity of a vehicle body
local entity = physics.vehicle.create()

entity:set_linear_velocity({0, 0, -5})

On this page