self:set_global_rotation

Client

Sets the global world-space rotation of the directional light


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

Rotate a directional light 45 degrees on the Y axis
local entity = light.directional.create()

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

On this page