LightOccluder2D

Inherits: Node2D < CanvasItem < Node < Object

Category: Core

Brief Description

Occludes light cast by a Light2D, thus casting shadows.

Member Variables

Description

Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.

Member Function Description

  • int get_occluder_light_mask ( ) const

Return the light mask of the LightOccluder2D.

Return the OccluderPolygon2D that defines the LightOccluder2D.

  • void set_occluder_light_mask ( int mask )

Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).

Set the OccluderPolygon2D that defines the LightOccluder2D.