summaryrefslogtreecommitdiff
path: root/scene/2d/navigation_agent_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/navigation_agent_2d.h')
-rw-r--r--scene/2d/navigation_agent_2d.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h
index 11b845665d..2c77bdc8db 100644
--- a/scene/2d/navigation_agent_2d.h
+++ b/scene/2d/navigation_agent_2d.h
@@ -34,6 +34,8 @@
#include "scene/main/node.h"
class Node2D;
+class NavigationPathQueryParameters2D;
+class NavigationPathQueryResult2D;
class NavigationAgent2D : public Node {
GDCLASS(NavigationAgent2D, Node);
@@ -58,8 +60,9 @@ class NavigationAgent2D : public Node {
real_t path_max_distance = 3.0;
Vector2 target_location;
- Vector<Vector2> navigation_path;
- int nav_path_index = 0;
+ Ref<NavigationPathQueryParameters2D> navigation_query;
+ Ref<NavigationPathQueryResult2D> navigation_result;
+ int navigation_path_index = 0;
bool velocity_submitted = false;
Vector2 prev_safe_velocity;
/// The submitted target velocity
@@ -138,12 +141,10 @@ public:
Vector2 get_next_location();
- Vector<Vector2> get_nav_path() const {
- return navigation_path;
- }
+ const Vector<Vector2> &get_current_navigation_path() const;
- int get_nav_path_index() const {
- return nav_path_index;
+ int get_current_navigation_path_index() const {
+ return navigation_path_index;
}
real_t distance_to_target() const;
@@ -155,7 +156,7 @@ public:
void set_velocity(Vector2 p_velocity);
void _avoidance_done(Vector3 p_new_velocity);
- TypedArray<String> get_configuration_warnings() const override;
+ PackedStringArray get_configuration_warnings() const override;
private:
void update_navigation();