User Tools

Site Tools


set_ambient_light_color

Set Ambient Light Color


Changes the color of the map's ambient light over a duration of time.

Signature:

set_ambient_light_color(color, duration)
ArgumentDescriptionTypeRequired
colorNew color for the ambient light.ColorYes
durationFade duration from its current color to the new color.NumberNo

If you'd like to instantly toggle the ambient light on or off instead of changing its color, see the related Set Ambient Light Enabled function.

Example:

set_ambient_light_color(color[255, 0, 255], 1);

Results: The color of the map's ambient light will change to magenta over a duration of one second.

Use the Set Ambient Light Color function to change the overall mood of a room or to complement another light source's color change.

Editor Node:

Visual Demo:

set_ambient_light_color.txt · Last modified: 2021/04/21 18:48 by justin