From 860379fc161698234b2757c6f62f8e05fa68ada8 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Tue, 6 Dec 2022 22:30:34 +0100 Subject: Stop NavigationAgents without a target from moving to world origin Stops NavigationAgents moving to the world origin without anyone telling them to do so. --- scene/2d/navigation_agent_2d.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/2d/navigation_agent_2d.h') diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 5abd3c0317..9f2d2e9ea7 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -60,6 +60,7 @@ class NavigationAgent2D : public Node { real_t path_max_distance = 3.0; Vector2 target_location; + bool target_position_submitted = false; Ref navigation_query; Ref navigation_result; int nav_path_index = 0; -- cgit v1.2.3