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
| Type | Name | Description |
|---|---|---|
bool | state | true to make this a driven wheel, false otherwise |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local car = physics.vehicle.create()
local entity = physics.vehicle_wheel.create(car)
entity:set_use_as_traction(true)