getLightCone
Client
Reads the opening and the edge hardness of a spot light's cone.
float|false getLightCone(light light)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The light. |
Returns
Two numbers: the angle in degrees from the axis and the hardness, from 0 to 0.99, or false with a wrong argument.
Example
local light = createSpotLight(0, 0, 10, 0, 0, -1)
local angle, hardness = getLightCone(light)
outputDebugString(angle .. " " .. hardness) -- 30 0.5NoteSpot lights only. On a point or rect light it logs a warning naming its type and returns
false.