M MY Multiplayer: Wiki
Side
Kind

setLightCastShadow

Client

Turns a light's shadows on or off.

bool setLightCastShadow(light light, bool castShadow)

Parameters

NameTypeDescription
lightlightThe light.
castShadowboolWhether 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)

See also