getLightSize
Client
Reads a rect light's width and height.
float|false getLightSize(light light)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The light. |
Returns
Two numbers: the width and the height in metres, or false with a wrong argument.
Example
local light = createRectLight(0, 0, 5, 0, -1, 0, 8, 255, 255, 255, 2, 0.5)
local width, height = getLightSize(light)
outputDebugString(width .. " x " .. height)NoteRect lights only. On a point or spot light it logs a warning naming its type and returns
false.