summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorSam Briels <sambriels@gmail.com>2022-10-27 10:17:10 +0200
committerSam Briels <sambriels@gmail.com>2022-10-27 14:05:43 +0200
commit815231943b562a252b627c6c72413d119140a9f4 (patch)
tree9200ddd2fffc23d5ba06e5a85e461543668cff9a /scene/3d
parent03e5de37ae3228de26e7b83888c542a9f400b5d9 (diff)
Emit target_reached signal after state is updated
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/navigation_agent_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp
index 39068fe83c..f64cabb75c 100644
--- a/scene/3d/navigation_agent_3d.cpp
+++ b/scene/3d/navigation_agent_3d.cpp
@@ -495,8 +495,8 @@ void NavigationAgent3D::_request_repath() {
void NavigationAgent3D::_check_distance_to_target() {
if (!target_reached) {
if (distance_to_target() < target_desired_distance) {
- emit_signal(SNAME("target_reached"));
target_reached = true;
+ emit_signal(SNAME("target_reached"));
}
}
}