diff options
Diffstat (limited to 'scene/2d/navigation_agent_2d.h')
-rw-r--r-- | scene/2d/navigation_agent_2d.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 97c5d94483..b7febba89d 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -48,6 +48,8 @@ class NavigationAgent2D : public Node { bool avoidance_enabled = false; uint32_t navigation_layers = 1; + NavigationPathQueryParameters2D::PathfindingAlgorithm pathfinding_algorithm = NavigationPathQueryParameters2D::PathfindingAlgorithm::PATHFINDING_ALGORITHM_ASTAR; + NavigationPathQueryParameters2D::PathPostProcessing path_postprocessing = NavigationPathQueryParameters2D::PathPostProcessing::PATH_POSTPROCESSING_CORRIDORFUNNEL; BitField<NavigationPathQueryParameters2D::PathMetadataFlags> path_metadata_flags = NavigationPathQueryParameters2D::PathMetadataFlags::PATH_METADATA_INCLUDE_ALL; real_t path_desired_distance = 20.0; @@ -112,6 +114,16 @@ public: void set_navigation_layer_value(int p_layer_number, bool p_value); bool get_navigation_layer_value(int p_layer_number) const; + void set_pathfinding_algorithm(const NavigationPathQueryParameters2D::PathfindingAlgorithm p_pathfinding_algorithm); + NavigationPathQueryParameters2D::PathfindingAlgorithm get_pathfinding_algorithm() const { + return pathfinding_algorithm; + } + + void set_path_postprocessing(const NavigationPathQueryParameters2D::PathPostProcessing p_path_postprocessing); + NavigationPathQueryParameters2D::PathPostProcessing get_path_postprocessing() const { + return path_postprocessing; + } + void set_path_metadata_flags(BitField<NavigationPathQueryParameters2D::PathMetadataFlags> p_flags); BitField<NavigationPathQueryParameters2D::PathMetadataFlags> get_path_metadata_flags() const { return path_metadata_flags; |