Mesh-based navigation and pathfinding node.
Provides navigation and pathfinding within a collection of NavigationMeshes. By default, these will be automatically collected from child NavigationMeshInstance nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
get_rid ( ) const
map_changed ( RID map )
Emitted when a navigation map is updated, when a region moves or is modified.
float cell_height =
The cell height to use for fields.
float cell_size =
The XZ plane cell size to use for fields.
float edge_connection_margin =
This value is used to detect the near edges to connect compatible regions.
int navigation_layers =
A bitfield determining all navigation map layers the navigation can use on a get_simple_path path query.
Vector3 up_vector =
Vector3( 0, 1, 0 )
Defines which direction is up. By default, this is
(0, 1, 0), which is the world's "up" direction.
Returns the navigation point closest to the point given. Points are in local coordinate space.
Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on.
Returns the navigation point closest to the given line segment. When enabling
use_collision, only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.
RID get_rid ( ) const
Returns the path between two given points. Points are in local coordinate space. If
true (the default), the agent properties associated with each NavigationMesh (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.