summaryrefslogtreecommitdiff
path: root/scene/2d/navigation_agent_2d.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-04-11 21:01:58 +0200
committerGitHub <noreply@github.com>2023-04-11 21:01:58 +0200
commit16a6bdd423aa85272837d0bc6b9e709febdb4ec0 (patch)
treea7f70f8ed81aec219e990c0b3f174dbd200ae793 /scene/2d/navigation_agent_2d.h
parent4762303f182e65c5293db8d22a4ce88521eba445 (diff)
parent177be9bd37e3dfa4d591eea3bb8ab14a17d06007 (diff)
Merge pull request #75786 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 1st batch
Diffstat (limited to 'scene/2d/navigation_agent_2d.h')
-rw-r--r--scene/2d/navigation_agent_2d.h12
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;