Files
godot-docs-l10n/classes/uk/class_navigationmesh.rst

820 lines
46 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_NavigationMesh:
NavigationMesh
==============
**Експериментальний:** This class may be changed or removed in future versions.
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Навігація сітки, яка визначає спокійні ділянки та перешкоди.
.. rst-class:: classref-introduction-group
Опис
--------
Навігаційна сітка - це колекція полігонів, які визначають, які ділянки навколишнього середовища є трафаретними для допомоги агентів в умовах трафаретизації через складні місця.
.. rst-class:: classref-introduction-group
Посібники
------------------
- :doc:`Використання навігації <../tutorials/navigation/navigation_using_navigationmeshes>`
- `3D навігація демо <https://godotengine.org/asset-library/asset/2743>`__
.. rst-class:: classref-reftable-group
Властивості
----------------------
.. table::
:widths: auto
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`agent_height<class_NavigationMesh_property_agent_height>` | ``1.5`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`agent_max_climb<class_NavigationMesh_property_agent_max_climb>` | ``0.25`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`agent_max_slope<class_NavigationMesh_property_agent_max_slope>` | ``45.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`agent_radius<class_NavigationMesh_property_agent_radius>` | ``0.5`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`border_size<class_NavigationMesh_property_border_size>` | ``0.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`cell_height<class_NavigationMesh_property_cell_height>` | ``0.25`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`cell_size<class_NavigationMesh_property_cell_size>` | ``0.25`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`detail_sample_distance<class_NavigationMesh_property_detail_sample_distance>` | ``6.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`detail_sample_max_error<class_NavigationMesh_property_detail_sample_max_error>` | ``1.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`edge_max_error<class_NavigationMesh_property_edge_max_error>` | ``1.3`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`edge_max_length<class_NavigationMesh_property_edge_max_length>` | ``0.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`AABB<class_AABB>` | :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` | ``AABB(0, 0, 0, 0, 0, 0)`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`filter_baking_aabb_offset<class_NavigationMesh_property_filter_baking_aabb_offset>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`bool<class_bool>` | :ref:`filter_ledge_spans<class_NavigationMesh_property_filter_ledge_spans>` | ``false`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`bool<class_bool>` | :ref:`filter_low_hanging_obstacles<class_NavigationMesh_property_filter_low_hanging_obstacles>` | ``false`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`bool<class_bool>` | :ref:`filter_walkable_low_height_spans<class_NavigationMesh_property_filter_walkable_low_height_spans>` | ``false`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>` | ``4294967295`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` | :ref:`geometry_parsed_geometry_type<class_NavigationMesh_property_geometry_parsed_geometry_type>` | ``2`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` | :ref:`geometry_source_geometry_mode<class_NavigationMesh_property_geometry_source_geometry_mode>` | ``0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`geometry_source_group_name<class_NavigationMesh_property_geometry_source_group_name>` | ``&"navigation_mesh_source_group"`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`region_merge_size<class_NavigationMesh_property_region_merge_size>` | ``20.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`region_min_size<class_NavigationMesh_property_region_min_size>` | ``2.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` | :ref:`sample_partition_type<class_NavigationMesh_property_sample_partition_type>` | ``0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`float<class_float>` | :ref:`vertices_per_polygon<class_NavigationMesh_property_vertices_per_polygon>` | ``6.0`` |
+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+
.. rst-class:: classref-reftable-group
Методи
------------
.. table::
:widths: auto
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_polygon<class_NavigationMesh_method_add_polygon>`\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear<class_NavigationMesh_method_clear>`\ (\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_polygons<class_NavigationMesh_method_clear_polygons>`\ (\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`create_from_mesh<class_NavigationMesh_method_create_from_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_NavigationMesh_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_polygon<class_NavigationMesh_method_get_polygon>`\ (\ idx\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationMesh_method_get_polygon_count>`\ (\ ) |const| |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_vertices<class_NavigationMesh_method_get_vertices>`\ (\ ) |const| |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_collision_mask_value<class_NavigationMesh_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_vertices<class_NavigationMesh_method_set_vertices>`\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Переліки
----------------
.. _enum_NavigationMesh_SamplePartitionType:
.. rst-class:: classref-enumeration
enum **SamplePartitionType**: :ref:`🔗<enum_NavigationMesh_SamplePartitionType>`
.. _class_NavigationMesh_constant_SAMPLE_PARTITION_WATERSHED:
.. rst-class:: classref-enumeration-constant
:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **SAMPLE_PARTITION_WATERSHED** = ``0``
Перегородка водозбору. Як правило, найкращий вибір, якщо ви передупутуєте навігацію сітки, використовуйте це, якщо у вас є великі відкриті зони.
.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MONOTONE:
.. rst-class:: classref-enumeration-constant
:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **SAMPLE_PARTITION_MONOTONE** = ``1``
Монотон розділення. Використовуйте це, якщо ви хочете швидко створити навігацію сітки.
.. _class_NavigationMesh_constant_SAMPLE_PARTITION_LAYERS:
.. rst-class:: classref-enumeration-constant
:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **SAMPLE_PARTITION_LAYERS** = ``2``
Розділення шарів. Хороший вибір для використання керамічної навігаційної сітки з середнім і невеликим розміром плиткою.
.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **SAMPLE_PARTITION_MAX** = ``3``
Представляємо розмір ``виразок вибіркиPartitionType`` enum.
.. rst-class:: classref-item-separator
----
.. _enum_NavigationMesh_ParsedGeometryType:
.. rst-class:: classref-enumeration
enum **ParsedGeometryType**: :ref:`🔗<enum_NavigationMesh_ParsedGeometryType>`
.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MESH_INSTANCES:
.. rst-class:: classref-enumeration-constant
:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **PARSED_GEOMETRY_MESH_INSTANCES** = ``0``
Пристрої сітки як геометрія. Це включає в себе :ref:`MeshInstance3D<class_MeshInstance3D>`, :ref:`CSGShape3D<class_CSGShape3D>`, і :ref:`GridMap<class_GridMap>` вершини.
.. _class_NavigationMesh_constant_PARSED_GEOMETRY_STATIC_COLLIDERS:
.. rst-class:: classref-enumeration-constant
:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **PARSED_GEOMETRY_STATIC_COLLIDERS** = ``1``
Розбирає колайдери :ref:`StaticBody3D<class_StaticBody3D>` як геометрію. Колайдер повинен знаходитися в будь-якому з шарів, визначених параметром :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>`.
.. _class_NavigationMesh_constant_PARSED_GEOMETRY_BOTH:
.. rst-class:: classref-enumeration-constant
:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **PARSED_GEOMETRY_BOTH** = ``2``
Як :ref:`PARSED_GEOMETRY_MESH_INSTANCES<class_NavigationMesh_constant_PARSED_GEOMETRY_MESH_INSTANCES>`, так і :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS<class_NavigationMesh_constant_PARSED_GEOMETRY_STATIC_COLLIDERS>`.
.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **PARSED_GEOMETRY_MAX** = ``3``
Представляємо розмір :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` enum.
.. rst-class:: classref-item-separator
----
.. _enum_NavigationMesh_SourceGeometryMode:
.. rst-class:: classref-enumeration
enum **SourceGeometryMode**: :ref:`🔗<enum_NavigationMesh_SourceGeometryMode>`
.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_ROOT_NODE_CHILDREN:
.. rst-class:: classref-enumeration-constant
:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **SOURCE_GEOMETRY_ROOT_NODE_CHILDREN** = ``0``
Сканує дочірні вузли кореневого вузла, що рекурсивно за геометрію.
.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN:
.. rst-class:: classref-enumeration-constant
:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN** = ``1``
Рекурсивно сканує вузли в групі та їхні дочірні вузли на предмет геометрії. Група визначається як :ref:`geometry_source_group_name<class_NavigationMesh_property_geometry_source_group_name>`.
.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT:
.. rst-class:: classref-enumeration-constant
:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **SOURCE_GEOMETRY_GROUPS_EXPLICIT** = ``2``
Використовує вузли в групі для геометрії. Група визначається як :ref:`geometry_source_group_name<class_NavigationMesh_property_geometry_source_group_name>`.
.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_MAX:
.. rst-class:: classref-enumeration-constant
:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **SOURCE_GEOMETRY_MAX** = ``3``
Представляє розмір :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` enum.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи властивостей
------------------------------------
.. _class_NavigationMesh_property_agent_height:
.. rst-class:: classref-property
:ref:`float<class_float>` **agent_height** = ``1.5`` :ref:`🔗<class_NavigationMesh_property_agent_height>`
.. rst-class:: classref-property-setget
- |void| **set_agent_height**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_agent_height**\ (\ )
Мінімальна підлога до висоти стелі, яка все ще дозволить площі підлоги вважати прогулянкою.
\ **Примітка:** В той час як випікання, це значення буде округлене до найближчої кількості :ref:`cell_height<class_NavigationMesh_property_cell_height>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_agent_max_climb:
.. rst-class:: classref-property
:ref:`float<class_float>` **agent_max_climb** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_agent_max_climb>`
.. rst-class:: classref-property-setget
- |void| **set_agent_max_climb**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_agent_max_climb**\ (\ )
Мінімальна висота під проводом, яка вважається, як і раніше, є розбіжним.
\ **Примітка:** У той час як випікання, це значення буде округлене до найближчого кількох :ref:`cell_height<class_NavigationMesh_property_cell_height>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_agent_max_slope:
.. rst-class:: classref-property
:ref:`float<class_float>` **agent_max_slope** = ``45.0`` :ref:`🔗<class_NavigationMesh_property_agent_max_slope>`
.. rst-class:: classref-property-setget
- |void| **set_agent_max_slope**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_agent_max_slope**\ (\ )
Максимальний схил, який вважається ходовим, в градусах.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_agent_radius:
.. rst-class:: classref-property
:ref:`float<class_float>` **agent_radius** = ``0.5`` :ref:`🔗<class_NavigationMesh_property_agent_radius>`
.. rst-class:: classref-property-setget
- |void| **set_agent_radius**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_agent_radius**\ (\ )
Відстань для звуження/зменшення прохідної зони поля висоти від перешкод.
\ **Примітка:** Під час запікання це значення буде округлено до найближчого кратного :ref:`cell_size<class_NavigationMesh_property_cell_size>`.
\ **Примітка:** Радіус має бути рівним або більшим за ``0.0``. Якщо радіус дорівнює ``0.0``, неможливо буде виправити недійсні перекриття контурів та інші помилки точності під час процесу запікання. В результаті деякі перешкоди можуть бути неправильно виключені з остаточної навігаційної сітки або можуть видалити полігони навігаційної сітки.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_border_size:
.. rst-class:: classref-property
:ref:`float<class_float>` **border_size** = ``0.0`` :ref:`🔗<class_NavigationMesh_property_border_size>`
.. rst-class:: classref-property-setget
- |void| **set_border_size**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_border_size**\ (\ )
Розмір ненавігаційної межі навколо області, що обмежує випікання.
У поєднанні з :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` та значенням :ref:`edge_max_error<class_NavigationMesh_property_edge_max_error>`, рівним ``1.0`` або нижче, розмір межі може бути використаний для випікання вирівняних по плитках навігаційних сіток без зменшень країв плиток на :ref:`agent_radius<class_NavigationMesh_property_agent_radius>`.
\ **Примітка:** Якщо це значення не дорівнює ``0.0``, воно буде округлено до найближчого кратного :ref:`cell_size<class_NavigationMesh_property_cell_size>` під час випікання.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_cell_height:
.. rst-class:: classref-property
:ref:`float<class_float>` **cell_height** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_cell_height>`
.. rst-class:: classref-property-setget
- |void| **set_cell_height**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_cell_height**\ (\ )
Висота комірки використовується для стерилізації навігаторів сітки на вісь Y. Повинна відповідати висоти клітин на навігаційній карті.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_cell_size:
.. rst-class:: classref-property
:ref:`float<class_float>` **cell_size** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_cell_size>`
.. rst-class:: classref-property-setget
- |void| **set_cell_size**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_cell_size**\ (\ )
Розмір комірки, що використовується для стерилізації навігаторів сітки на площині XZ. Необхідно відповідати розміру комірки на карті навігації.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_detail_sample_distance:
.. rst-class:: classref-property
:ref:`float<class_float>` **detail_sample_distance** = ``6.0`` :ref:`🔗<class_NavigationMesh_property_detail_sample_distance>`
.. rst-class:: classref-property-setget
- |void| **set_detail_sample_distance**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_detail_sample_distance**\ (\ )
Відстань відбору для використання при генеруванні докладної сітки, в клітинному модулі.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_detail_sample_max_error:
.. rst-class:: classref-property
:ref:`float<class_float>` **detail_sample_max_error** = ``1.0`` :ref:`🔗<class_NavigationMesh_property_detail_sample_max_error>`
.. rst-class:: classref-property-setget
- |void| **set_detail_sample_max_error**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_detail_sample_max_error**\ (\ )
Максимальна відстань деталі сітки поверхні слід відхилити від висотиполу, в клітинному агрегаті.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_edge_max_error:
.. rst-class:: classref-property
:ref:`float<class_float>` **edge_max_error** = ``1.3`` :ref:`🔗<class_NavigationMesh_property_edge_max_error>`
.. rst-class:: classref-property-setget
- |void| **set_edge_max_error**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_edge_max_error**\ (\ )
Максимальна відстань спрощених контурних країв слід відхилити оригінальний сирий контур.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_edge_max_length:
.. rst-class:: classref-property
:ref:`float<class_float>` **edge_max_length** = ``0.0`` :ref:`🔗<class_NavigationMesh_property_edge_max_length>`
.. rst-class:: classref-property-setget
- |void| **set_edge_max_length**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_edge_max_length**\ (\ )
Максимальна допустима довжина для контурних країв вздовж кордону сітки. Значення ``0.0`` вимкнено цю функцію.
\ **Примітка:** У той час як випікання, це значення буде округлене до найближчого кількох :ref:`cell_size<class_NavigationMesh_property_cell_size>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_filter_baking_aabb:
.. rst-class:: classref-property
:ref:`AABB<class_AABB>` **filter_baking_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_NavigationMesh_property_filter_baking_aabb>`
.. rst-class:: classref-property-setget
- |void| **set_filter_baking_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ )
- :ref:`AABB<class_AABB>` **get_filter_baking_aabb**\ (\ )
Якщо випікання :ref:`AABB<class_AABB>` має об'єм навігаційної сітки, яка буде обмежена до її огороджувальної площі.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_filter_baking_aabb_offset:
.. rst-class:: classref-property
:ref:`Vector3<class_Vector3>` **filter_baking_aabb_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationMesh_property_filter_baking_aabb_offset>`
.. rst-class:: classref-property-setget
- |void| **set_filter_baking_aabb_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_filter_baking_aabb_offset**\ (\ )
Зміщення позиції, застосоване до :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` :ref:`AABB<class_AABB>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_filter_ledge_spans:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **filter_ledge_spans** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_ledge_spans>`
.. rst-class:: classref-property-setget
- |void| **set_filter_ledge_spans**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_filter_ledge_spans**\ (\ )
Якщо ``true``, розмітки, які підводять як неможливий.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_filter_low_hanging_obstacles:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **filter_low_hanging_obstacles** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_low_hanging_obstacles>`
.. rst-class:: classref-property-setget
- |void| **set_filter_low_hanging_obstacles**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_filter_low_hanging_obstacles**\ (\ )
Якщо ``true``, позначки неможливих прольотів, як прогулянку, якщо їх максимальна кількість знаходиться в межах :ref:`agent_max_climb<class_NavigationMesh_property_agent_max_climb>` прогулянку сусідом.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_filter_walkable_low_height_spans:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **filter_walkable_low_height_spans** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_walkable_low_height_spans>`
.. rst-class:: classref-property-setget
- |void| **set_filter_walkable_low_height_spans**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_filter_walkable_low_height_spans**\ (\ )
Якщо ``true``, позначки ходових прольотів, як не прогулянку, якщо зазор вище пропуску менше :ref:`agent_height<class_NavigationMesh_property_agent_height>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_geometry_collision_mask:
.. rst-class:: classref-property
:ref:`int<class_int>` **geometry_collision_mask** = ``4294967295`` :ref:`🔗<class_NavigationMesh_property_geometry_collision_mask>`
.. rst-class:: classref-property-setget
- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_collision_mask**\ (\ )
Фізичні шари для сканування статичних комірок.
Тільки використовується при :ref:`geometry_parsed_geometry_type<class_NavigationMesh_property_geometry_parsed_geometry_type>` :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS<class_NavigationMesh_constant_PARSED_GEOMETRY_STATIC_COLLIDERS>` або :ref:`PARSED_GEOMETRY_BOTH<class_NavigationMesh_constant_PARSED_GEOMETRY_BOTH>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_geometry_parsed_geometry_type:
.. rst-class:: classref-property
:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **geometry_parsed_geometry_type** = ``2`` :ref:`🔗<class_NavigationMesh_property_geometry_parsed_geometry_type>`
.. rst-class:: classref-property-setget
- |void| **set_parsed_geometry_type**\ (\ value\: :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>`\ )
- :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **get_parsed_geometry_type**\ (\ )
Визначає, який тип вузлів буде розібрано як геометрія.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_geometry_source_geometry_mode:
.. rst-class:: classref-property
:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **geometry_source_geometry_mode** = ``0`` :ref:`🔗<class_NavigationMesh_property_geometry_source_geometry_mode>`
.. rst-class:: classref-property-setget
- |void| **set_source_geometry_mode**\ (\ value\: :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>`\ )
- :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **get_source_geometry_mode**\ (\ )
Джерело геометрії, що використовується під час випікання.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_geometry_source_group_name:
.. rst-class:: classref-property
:ref:`StringName<class_StringName>` **geometry_source_group_name** = ``&"navigation_mesh_source_group"`` :ref:`🔗<class_NavigationMesh_property_geometry_source_group_name>`
.. rst-class:: classref-property-setget
- |void| **set_source_group_name**\ (\ value\: :ref:`StringName<class_StringName>`\ )
- :ref:`StringName<class_StringName>` **get_source_group_name**\ (\ )
Назва групи для сканування геометрії.
Тільки використовується при :ref:`geometry_source_geometry_mode<class_NavigationMesh_property_geometry_source_geometry_mode>` і constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] або :ref:`SOURCE_GEOMETRY_GROUPS_EXPLICIT<class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_region_merge_size:
.. rst-class:: classref-property
:ref:`float<class_float>` **region_merge_size** = ``20.0`` :ref:`🔗<class_NavigationMesh_property_region_merge_size>`
.. rst-class:: classref-property-setget
- |void| **set_region_merge_size**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_region_merge_size**\ (\ )
Усі регіони з розміром менше, ніж це буде об'єднано з більшими регіонами, якщо це можливо.
\ **Примітка:** Це значення буде квадратним, щоб розрахувати кількість клітин. Наприклад, значення 20 буде встановлювати кількість клітин до 400.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_region_min_size:
.. rst-class:: classref-property
:ref:`float<class_float>` **region_min_size** = ``2.0`` :ref:`🔗<class_NavigationMesh_property_region_min_size>`
.. rst-class:: classref-property-setget
- |void| **set_region_min_size**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_region_min_size**\ (\ )
Мінімальний розмір регіону для його створення.
\ **Примітка:** Це значення буде квадратним, щоб розрахувати мінімальну кількість клітин, що дозволяють формувати ізольовані райони острова. Наприклад, значення 8 буде встановлювати кількість клітин до 64.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_sample_partition_type:
.. rst-class:: classref-property
:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **sample_partition_type** = ``0`` :ref:`🔗<class_NavigationMesh_property_sample_partition_type>`
.. rst-class:: classref-property-setget
- |void| **set_sample_partition_type**\ (\ value\: :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>`\ )
- :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **get_sample_partition_type**\ (\ )
Алгоритм розбиття для створення полігонів навігаційної сітки.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_property_vertices_per_polygon:
.. rst-class:: classref-property
:ref:`float<class_float>` **vertices_per_polygon** = ``6.0`` :ref:`🔗<class_NavigationMesh_property_vertices_per_polygon>`
.. rst-class:: classref-property-setget
- |void| **set_vertices_per_polygon**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_vertices_per_polygon**\ (\ )
Максимальна кількість вершин допускається для полігонів, створених під час контуру до процесу перетворення полігонів.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _class_NavigationMesh_method_add_polygon:
.. rst-class:: classref-method
|void| **add_polygon**\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_NavigationMesh_method_add_polygon>`
Додає полігон, використовуючи індекси вершин, отриманих під час виклику :ref:`get_vertices()<class_NavigationMesh_method_get_vertices>`.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_clear:
.. rst-class:: classref-method
|void| **clear**\ (\ ) :ref:`🔗<class_NavigationMesh_method_clear>`
Очищає внутрішні масиви для вершин і індексів полігонів.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_clear_polygons:
.. rst-class:: classref-method
|void| **clear_polygons**\ (\ ) :ref:`🔗<class_NavigationMesh_method_clear_polygons>`
Очищає масив полігонів, але не очищає масив вершин.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_create_from_mesh:
.. rst-class:: classref-method
|void| **create_from_mesh**\ (\ mesh\: :ref:`Mesh<class_Mesh>`\ ) :ref:`🔗<class_NavigationMesh_method_create_from_mesh>`
Навігація навігаційної сітки шляхом встановлення вершин і індексів згідно :ref:`Mesh<class_Mesh>`.
\ **Примітка:** Надана ``mesh`` повинна бути типу :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>` і мати індексний масив.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_get_collision_mask_value:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_collision_mask_value>`
Повертає, чи ввімкнено вказаний шар :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>`, враховуючи значення ``layer_number`` від 1 до 32.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_get_polygon:
.. rst-class:: classref-method
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_polygon**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationMesh_method_get_polygon>`
Повернення :ref:`PackedInt32Array<class_PackedInt32Array>`, що містить індекси вершин створеного полігону.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_get_polygon_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_polygon_count**\ (\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_polygon_count>`
Повертає кількість полігонів в навігаційній сітці.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_get_vertices:
.. rst-class:: classref-method
:ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices**\ (\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_vertices>`
Повертаємо :ref:`PackedVector3Array<class_PackedVector3Array>`, що містить всі вершини, які використовуються для створення полігонів.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_set_collision_mask_value:
.. rst-class:: classref-method
|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationMesh_method_set_collision_mask_value>`
На основі ``value`` вмикає або вимикає вказаний шар у :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>`, задано ``layer_number`` між 1 та 32.
.. rst-class:: classref-item-separator
----
.. _class_NavigationMesh_method_set_vertices:
.. rst-class:: classref-method
|void| **set_vertices**\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_NavigationMesh_method_set_vertices>`
Встановлює вершини, які потім можна індексувати для створення полігонів за допомогою методу :ref:`add_polygon()<class_NavigationMesh_method_add_polygon>`.
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
.. |void| replace:: :abbr:`void (Значення не повертається.)`