Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Light2D

Inherits: Node2D < CanvasItem < Node < Object

Inherited By: DirectionalLight2D, PointLight2D

Casts light in a 2D environment.

Description

Casts light in a 2D environment. A light is defined as a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related).

Tutorials

Properties

BlendMode

blend_mode

0

Color

color

Color(1, 1, 1, 1)

bool

editor_only

false

bool

enabled

true

float

energy

1.0

int

range_item_cull_mask

1

int

range_layer_max

0

int

range_layer_min

0

int

range_z_max

1024

int

range_z_min

-1024

Color

shadow_color

Color(0, 0, 0, 0)

bool

shadow_enabled

false

ShadowFilter

shadow_filter

0