:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the NavigationRegion2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_NavigationRegion2D: NavigationRegion2D ================== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A region of the 2D navigation map. Description ----------- A region of the navigation map. It tells the :ref:`NavigationServer2D` what can be navigated and what cannot, based on its :ref:`NavigationPolygon` resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer2D.map_set_edge_connection_margin`. \ **Note:** Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge. Properties ---------- +---------------------------------------------------+-----------------------------------------------------------+----------+ | :ref:`bool` | :ref:`enabled` | ``true`` | +---------------------------------------------------+-----------------------------------------------------------+----------+ | :ref:`int` | :ref:`layers` | ``1`` | +---------------------------------------------------+-----------------------------------------------------------+----------+ | :ref:`NavigationPolygon` | :ref:`navpoly` | | +---------------------------------------------------+-----------------------------------------------------------+----------+ Property Descriptions --------------------- .. _class_NavigationRegion2D_property_enabled: - :ref:`bool` **enabled** +-----------+--------------------+ | *Default* | ``true`` | +-----------+--------------------+ | *Setter* | set_enabled(value) | +-----------+--------------------+ | *Getter* | is_enabled() | +-----------+--------------------+ Determines if the ``NavigationRegion2D`` is enabled or disabled. ---- .. _class_NavigationRegion2D_property_layers: - :ref:`int` **layers** +-----------+-------------------+ | *Default* | ``1`` | +-----------+-------------------+ | *Setter* | set_layers(value) | +-----------+-------------------+ | *Getter* | get_layers() | +-----------+-------------------+ A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with :ref:`NavigationServer2D.map_get_path`. ---- .. _class_NavigationRegion2D_property_navpoly: - :ref:`NavigationPolygon` **navpoly** +----------+-------------------------------+ | *Setter* | set_navigation_polygon(value) | +----------+-------------------------------+ | *Getter* | get_navigation_polygon() | +----------+-------------------------------+ The :ref:`NavigationPolygon` resource to use. .. |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.)`