fix: emit target_reached signal after updating state
This commit is contained in:
parent
80b50e59d5
commit
3e186ae043
1 changed files with 1 additions and 1 deletions
|
@ -481,8 +481,8 @@ void NavigationAgent2D::_request_repath() {
|
|||
void NavigationAgent2D::_check_distance_to_target() {
|
||||
if (!target_reached) {
|
||||
if (distance_to_target() < target_desired_distance) {
|
||||
emit_signal("target_reached");
|
||||
target_reached = true;
|
||||
emit_signal("target_reached");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue