:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the LightOccluder2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_LightOccluder2D: LightOccluder2D =============== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Occludes light cast by a Light2D, casting shadows. Description ----------- Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an :ref:`OccluderPolygon2D` in order for the shadow to be computed. Tutorials --------- - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` Properties ---------- +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ | :ref:`OccluderPolygon2D` | :ref:`occluder` | | +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`occluder_light_mask` | ``1`` | +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`sdf_collision` | ``true`` | +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ Property Descriptions --------------------- .. _class_LightOccluder2D_property_occluder: - :ref:`OccluderPolygon2D` **occluder** +----------+-----------------------------+ | *Setter* | set_occluder_polygon(value) | +----------+-----------------------------+ | *Getter* | get_occluder_polygon() | +----------+-----------------------------+ The :ref:`OccluderPolygon2D` used to compute the shadow. ---- .. _class_LightOccluder2D_property_occluder_light_mask: - :ref:`int` **occluder_light_mask** +-----------+--------------------------------+ | *Default* | ``1`` | +-----------+--------------------------------+ | *Setter* | set_occluder_light_mask(value) | +-----------+--------------------------------+ | *Getter* | get_occluder_light_mask() | +-----------+--------------------------------+ The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). ---- .. _class_LightOccluder2D_property_sdf_collision: - :ref:`bool` **sdf_collision** +-----------+-----------------------------+ | *Default* | ``true`` | +-----------+-----------------------------+ | *Setter* | set_as_sdf_collision(value) | +-----------+-----------------------------+ | *Getter* | is_set_as_sdf_collision() | +-----------+-----------------------------+ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`