Vehicle Body

self:set_global_rotation

Shared

Sets the global rotation of the vehicle body

Syntax

local status = self:set_global_rotation(
    rotation
)

Parameters

TypeNameDescription
vector3rotationRotation to apply in degrees as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the global rotation of a vehicle body
local entity = physics.vehicle.create()

entity:set_global_rotation({0, 90, 0})

On this page