A navigation mesh that defines traversable areas and obstacles.
A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces.
The minimum floor to ceiling height that will still allow the floor area to be considered walkable.
Note: While baking, this value will be rounded up to the nearest multiple of cell_height.
The minimum ledge height that is considered to still be traversable.
Note: While baking, this value will be rounded down to the nearest multiple of cell_height.
The distance to erode/shrink the walkable area of the heightfield away from obstructions.
Note: While baking, this value will be rounded up to the nearest multiple of cell_size.
Note: The radius must be equal or higher than 0.0. If the radius is 0.0, it won't be possible to fix invalid outline overlaps and other precision errors during the baking process. As a result, some obstacles may be excluded incorrectly from the final navigation mesh, or may delete the navigation mesh's polygons.
The size of the non-navigable border around the bake bounding area.
In conjunction with the filter_baking_aabb and a edge_max_error value at 1.0 or below the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by agent_radius.
Note: If this value is not 0.0, it will be rounded up to the nearest multiple of cell_size during baking.
The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map.
The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map.
The maximum allowed length for contour edges along the border of the mesh. A value of 0.0 disables this feature.
Note: While baking, this value will be rounded up to the nearest multiple of cell_size.
If the baking AABB has a volume the navigation mesh baking will be restricted to its enclosing area.
The position offset applied to the filter_baking_aabb AABB.
If true, marks non-walkable spans as walkable if their maximum is within agent_max_climb of a walkable neighbor.
If true, marks walkable spans as not walkable if the clearance above the span is less than agent_height.
The physics layers to scan for static colliders.
Only used when geometry_parsed_geometry_type is PARSED_GEOMETRY_STATIC_COLLIDERS or PARSED_GEOMETRY_BOTH.
The name of the group to scan for geometry.
Only used when geometry_source_geometry_mode is SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN or SOURCE_GEOMETRY_GROUPS_EXPLICIT.
Any regions with a size smaller than this will be merged with larger regions if possible.
Note: This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400.
The minimum size of a region for it to be created.
Note: This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64.
The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.
Adds a polygon using the indices of the vertices you get when calling get_vertices().
Clears the array of polygons, but it doesn't clear the array of vertices.
Initializes the navigation mesh by setting the vertices and indices according to a Mesh.
Note: The given mesh must be of type Mesh.PRIMITIVE_TRIANGLES and have an index array.
Returns whether or not the specified layer of the geometry_collision_mask is enabled, given a layer_number between 1 and 32.
Returns a PackedInt32Array containing the indices of the vertices of a created polygon.
Returns a PackedVector3Array containing all the vertices being used to create the polygons.
Based on value, enables or disables the specified layer in the geometry_collision_mask, given a layer_number between 1 and 32.
Sets the vertices that can be then indexed to create polygons with the add_polygon() method.
SAMPLE_PARTITION_WATERSHED = 0Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas.
SAMPLE_PARTITION_MONOTONE = 1Monotone partitioning. Use this if you want fast navigation mesh generation.
SAMPLE_PARTITION_LAYERS = 2Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles.
SAMPLE_PARTITION_MAX = 3Represents the size of the SamplePartitionType enum.
PARSED_GEOMETRY_MESH_INSTANCES = 0Parses mesh instances as geometry. This includes MeshInstance3D, CSGShape3D, and GridMap nodes.
PARSED_GEOMETRY_STATIC_COLLIDERS = 1Parses StaticBody3D colliders as geometry. The collider should be in any of the layers specified by geometry_collision_mask.
PARSED_GEOMETRY_BOTH = 2Both PARSED_GEOMETRY_MESH_INSTANCES and PARSED_GEOMETRY_STATIC_COLLIDERS.
PARSED_GEOMETRY_MAX = 3Represents the size of the ParsedGeometryType enum.
SOURCE_GEOMETRY_ROOT_NODE_CHILDREN = 0Scans the child nodes of the root node recursively for geometry.
SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN = 1Scans nodes in a group and their child nodes recursively for geometry. The group is specified by geometry_source_group_name.
SOURCE_GEOMETRY_GROUPS_EXPLICIT = 2Uses nodes in a group for geometry. The group is specified by geometry_source_group_name.
SOURCE_GEOMETRY_MAX = 3Represents the size of the SourceGeometryMode enum.