M MY Multiplayer: Wiki
Side
Kind

getLightCone

Client

Reads the opening and the edge hardness of a spot light's cone.

float|false getLightCone(light light)

Parameters

NameTypeDescription
lightlightThe 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.5
NoteSpot lights only. On a point or rect light it logs a warning naming its type and returns false.

See also