Inherits: Node2D < CanvasItem < Node < Object
Occludes light cast by a Light2D, thus casting shadows.
|int||get_occluder_light_mask ( ) const|
|OccluderPolygon2D||get_occluder_polygon ( ) const|
|void||set_occluder_light_mask ( int mask )|
|void||set_occluder_polygon ( OccluderPolygon2D polygon )|
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.
- OccluderPolygon2D get_occluder_polygon ( ) const
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).
- void set_occluder_polygon ( OccluderPolygon2D polygon )
Set the OccluderPolygon2D that defines the LightOccluder2D.