Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
Parameters to be sent to a 2D navigation path query.
This class contains the start and target position and other parameters to be used with NavigationServer2D.query_path.
PathfindingAlgorithm PATHFINDING_ALGORITHM_ASTAR =
The path query uses the default A* pathfinding algorithm.
PathPostProcessing PATH_POSTPROCESSING_CORRIDORFUNNEL =
Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
PathPostProcessing PATH_POSTPROCESSING_EDGECENTERED =
Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
PathMetadataFlags PATH_METADATA_INCLUDE_NONE =
Don't include any additional metadata about the returned path.
PathMetadataFlags PATH_METADATA_INCLUDE_TYPES =
Include the type of navigation primitive (region or link) that each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_RIDS =
Include the RIDs of the regions and links that each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_OWNERS =
ObjectIDs of the Objects which manage the regions and links each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_ALL =
Include all available metadata about the returned path.
map RID used in the path query.
PathMetadataFlags metadata_flags =
Additional information to include with the navigation path.
int navigation_layers =
The navigation layers the query will use (as a bitmask).
PathPostProcessing path_postprocessing =
void set_path_postprocessing ( PathPostProcessing value )
PathPostProcessing get_path_postprocessing ( )
The path postprocessing applied to the raw path corridor found by the pathfinding_algorithm.
PathfindingAlgorithm pathfinding_algorithm =
void set_pathfinding_algorithm ( PathfindingAlgorithm value )
PathfindingAlgorithm get_pathfinding_algorithm ( )
The pathfinding algorithm used in the path query.
Vector2 start_position =
The pathfinding start position in global coordinates.
Vector2 target_position =
The pathfinding target position in global coordinates.