diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-04-11 21:01:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 21:01:58 +0200 |
commit | 16a6bdd423aa85272837d0bc6b9e709febdb4ec0 (patch) | |
tree | a7f70f8ed81aec219e990c0b3f174dbd200ae793 /scene/2d/navigation_agent_2d.h | |
parent | 4762303f182e65c5293db8d22a4ce88521eba445 (diff) | |
parent | 177be9bd37e3dfa4d591eea3bb8ab14a17d06007 (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.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; |