self:get_global_rotation

Client

Retrieves the global rotation of the vehicle body in degrees


Syntax

local rotation = self:get_global_rotation()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3rotationCurrent global rotation in degrees as {x, y, z}

Examples

Get the global rotation of a vehicle body
local entity = physics.vehicle.create()
local rotation = entity:get_global_rotation()

core.engine.print("info", "Vehicle body rotation:", util.table.unpack(rotation))

On this page