setLightCastShadow
Client
Turns a light's shadows on or off.
bool setLightCastShadow(light light, bool castShadow)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The light. |
| castShadow | bool | Whether the light casts shadows. |
Returns
true if it changed. With a wrong argument it logs a warning and returns false.
With a shadow, a spot light uses one view with its own cone; a point or rect light uses a cube of six views from its centre.
Example
local light = createPointLight(2495.1, -1687.4, 14.5, 12)
setLightCastShadow(light, true)