getLightBarnDoor
Client
Reads a rect light's barn doors.
float|false getLightBarnDoor(light light)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The 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.2NoteRect lights only. On a point or spot light it logs a warning naming its type and returns
false.