Navigation

Inherits: Spatial < Node < Object Mesh-based navigation and pathfinding node.

Description

Deprecated. Navigation node and get_simple_path are deprecated and will be removed in a future version. Use NavigationServer.map_get_path instead. 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.

Tutorials

  • 3D Navmesh Demo

    Properties

    Methods

    Signals

  • map_changed ( RID map ) Emitted when a navigation map is updated, when a region moves or is modified.

    Property Descriptions

  • 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 get_simple_path path query.

  • Vector3 up_vector (0, 1, 0), which is the world’s “up” direction.

    Method Descriptions

  • Vector3 get_closest_point ( Vector3 to_point ) const Returns the navigation point closest to the point given. Points are in local coordinate space.

  • Vector3 get_closest_point_normal ( Vector3 to_point ) const 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.

  • RID get_closest_point_owner ( Vector3 to_point ) const NavigationMesh which contains the navigation point closest to the point given. This is usually a NavigationMeshInstance.

  • Vector3 get_closest_point_to_segment ( Vector3 start, Vector3 end, bool use_collision=false ) const 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 RID of the navigation map on the NavigationServer.

  • PoolVector3Array get_simple_path ( Vector3 start, Vector3 end, bool optimize=true ) const Deprecated. Navigation node and get_simple_path are deprecated and will be removed in a future version. Use NavigationServer.map_get_path instead. optimize is true (the default), the agent properties associated with each NavigationMesh (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.