self:is_used_as_traction

Client

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


Syntax

local result = self:is_used_as_traction()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the condition is met, false otherwise

Examples

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

core.engine.print("info", "Vehicle wheel used as traction:", entity:is_used_as_traction())

On this page