setLightCone
Client
Changes the opening and the edge hardness of a spot light's cone.
bool setLightCone(light light, float angle [, float hardness = nil])
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The light. |
| angle | float | Half the cone's opening, in degrees from its axis, above 0 and up to 90. |
| hardness | float | Fraction of the cone lit fully, from 0 to 1. Anything above 0.99 counts as 0.99. Left out, the current hardness is kept.default nil |
Returns
true if it changed. With a wrong argument it logs a warning and returns false.
Example
local light = createSpotLight(2495.1, -1687.4, 20, 0, 0, -1, 25)
setLightCone(light, 15, 0.9)NoteSpot lights only. On a point or rect light it logs a warning naming its type and returns
false.