Only move when full path to target is clear

Hi there,
I’m new to A* and it’s been great, there is one problem though…
In my level, there is a sliding door. I’ve made it so A* knows it can’t move along it, so it searches for a different path. In this specific level, the agent can’t get to the target until the door is open.
The problem is that it moves to the closest place near the target as possible.

I want the agent to remain stationary until it has the full path to the target, how do I go about that?

Hey,

you can check if the path is possible using this:
https://arongranberg.com/astar/docs/pathutilities.html#IsPathPossible3