LightOccluder2D
Inherits: Node2D < CanvasItem < Node < Object
Category: Core
Brief Description
Occludes light cast by a Light2D, thus casting shadows.
Member Functions
int | get_occluder_light_mask ( ) const |
OccluderPolygon2D | get_occluder_polygon ( ) const |
void | set_occluder_light_mask ( int mask ) |
void | set_occluder_polygon ( OccluderPolygon2D polygon ) |
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.
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.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_lightoccluder2d.html