self:set_use_as_traction

Client

Sets whether the wheel is used as a traction (driven) wheel


Syntax

local status = self:set_use_as_traction(
    state
)

Parameters

TypeNameDescription
boolstatetrue to make this a driven wheel, false otherwise

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Enable traction on a vehicle wheel
local car = physics.vehicle.create()
local entity = physics.vehicle_wheel.create(car)

entity:set_use_as_traction(true)

On this page