Hi, is it possible to verify that some target is reachable by navigation agent without setting a target position for it first (via set_target_position)?

    dnk if the target position is invalid, get_next_path_position will return the position of the agent's parent. Along with is_navigation_finished, that should be workable. Failing that, if you know more about the environment (e.g. something like a grid/movement allowance/distances), you could plug positions into an AStar object and use something like has_point to determine if a point is reachable.

    But I don't know your project - there could be many solutions to the problem you're facing; I feel 'reachable' is a bit fluffy here.

    • dnk replied to this.

      spaceyjase thank you for your reply, I'm adding a roaming behaviour to an NPC on a 2d tile map. My current target is to get several closest tiles and check if they are reachable for npc by mimicking the NavigationAgent2D.is_target_reachable() method while the npc is sill moving to the current target (has target_position set to the original destination).

        dnk how about another navigation agent to test another target? A bit naive but should work, fix the performance issues later…