Vehicle Wheel

physics.vehicle_wheel.create

Shared

Creates a new vehicle wheel instance and attaches it to a vehicle body

Syntax

local instance = physics.vehicle_wheel.create(
    body
)

Parameters

TypeNameDescription
objectbodyVehicle body instance to attach the wheel to

Returns

TypeNameDescription
objectinstanceCreated vehicle wheel instance

Examples

Create a vehicle wheel instance
local car = physics.vehicle.create()
local entity = physics.vehicle_wheel.create(car)

entity:set_position({-1, -0.5, 1.5})
entity:set_use_as_traction(true)

On this page