You are reading the
(unstable) version of this documentation, which may document features not available
or compatible with Godot 3.x.
Checking the stable version of the documentation...
Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please
open an issue.
NavigationLinks are used to connect navmesh polygons from NavigationRegion2D
and NavigationRegion3D over arbitrary distances for pathfinding.
NavigationLinks are also used to consider movement shortcuts in pathfinding available through
interacting with gameplay objects e.g. ladders, jump pads or teleports.
2D and 3D versions of NavigationJumplinks nodes are available as
Different NavigationRegions can connect their navmeshes without the need for a NavigationLink
as long as they are within navigation map
edge_connection_margin and have compatible
As soon as the distance becomes too large, building valid connections becomes a problem - a problem that NavigationLinks can solve.
See Using NavigationRegions to learn more about the use of navigation regions.
See Connecting NavigationMeshes to learn more about how to connect navigation meshes.
NavigationLinks share many properties with NavigationRegions like
NavigationLinks add a single connection between two positions over an arbitrary distance
compared to NavigationRegions that add a more local traversable area with a navmesh resource.
NavigationLinks have a
end_location and can go in both directions when
bidirectional is enabled.
When placed a navigationlink connects the navmesh polygons closest to its
end_location within search radius for pathfinding.
The polygon search radius can be configured globally in the ProjectSettings under
or set for each navigation
map individually using the
end_location have debug markers in the Editor.
The visible radius of a position shows the polygon search radius.
All navmesh polygons inside are compared and the closest is picked for the edge connection.
If no valid polygon is found within the search radius the navigation link gets disabled.
The link debug visuals can be changed in the Editor ProjectSettings under
The visibility of the debug can also be controlled in the Editor 3D Viewport gizmo menu.
NavigationLinks do not move agents between the two link positions by themselves.
A navigation link does not provide any automated movement through the link. Instead, when
an agent reaches the position of a link, game code needs to react (e.g. through area triggers) and provide means for the agent
to move through the link to end up at the links other position (e.g. through teleport or animation) to continue along the path.