M MY Multiplayer: Wiki
Side
Kind

getLightBarnDoor

Client

Reads a rect light's barn doors.

float|false getLightBarnDoor(light light)

Parameters

NameTypeDescription
lightlightThe light.

Returns

Two numbers: the angle in degrees and the length in metres, or false with a wrong argument.

Example

local light = createRectLight(0, 0, 5, 0, 0, -1)
local angle, length = getLightBarnDoor(light)
outputDebugString(angle .. " " .. length) -- 88 0.2
NoteRect lights only. On a point or spot light it logs a warning naming its type and returns false.

See also