Nav agent can enter but can not exit nav region. I want to take it out of region

Godot Version

4.2

Question

I have thieves in my 2d game that have navigation agent node. They initially enter the navigation region from out of screen(and region). They enter, steal something, and should go out, but because of navigation agent node, they can not exit and stuck in edge of the navigation region.
I intend to take them out and then queue_free them.
What A good way to do that?should i remove navigation agent node at end and use a simple move method to move thrm out or something else?
Thank you

Whatever node your NavigationAgent is attached to is kept inside the navigation region only by your own movement code. The NavigationAgent certainly does not move your node. So all you need to do is move your node somewhere else.

Thanks. You helped me to find solution.
I disabled process method at some point, and used move_toward method to move the node out. Maybe it’s not best solution, but it worked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.