self:get_global_rotation

Client

Retrieves the global world-space rotation of the directional light


Syntax

local rotation = self:get_global_rotation()

Parameters

No parameters are accepted by this function

Returns

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

Examples

Get the global world-space rotation of a directional light
local entity = light.directional.create()
local rotation = entity:get_global_rotation()

core.engine.print("info", "Directional light rotation:", util.table.unpack(rotation))

On this page