How to make NavigationAgent2D stop navigating? (4.2.2)

like, make his path desapear, to the state he was before he starts navigating, not just idle after getting on the destination, make it stop processing the path and its swinging idle movement

process_mode set to disabled only make it stop showing debug lines

Just set the target_position to the global_position of the agent.

the path(destination point only) will still exist and the navAgent will still try to get there so will start swinging in the same place

If the target position and the agent position are identical the path will return as an empty array that causes a navigation finished.

Movement is part of your custom agent script. You need to stop your own code responsible for the actual movement there.

1 Like