self:set_axis_lock

Client

Locks or unlocks a specific movement axis on the vehicle body


Syntax

local status = self:set_axis_lock(
    axis,
    lock
)

Parameters

TypeNameDescription
intaxisAxis enum value — refer to physics.vehicle.axis
boollocktrue to lock the axis, false to unlock it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Lock an axis on a vehicle body
local entity = physics.vehicle.create()

entity:set_axis_lock(physics.vehicle.axis.LINEAR_X, true)

On this page