physics.vehicle.create

Client

Creates a new vehicle body instance and adds it to the scene


Syntax

local instance = physics.vehicle.create()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
objectinstanceCreated vehicle body instance

Examples

Create a vehicle body instance
local entity = physics.vehicle.create()
local shape = physics.collision_shape.create(entity)

shape:set_shape_box({2, 1, 4})
entity:set_engine_force(50)

On this page