I believe the agent also requires the end of the path to be visible from its current position. The reason is that the remaining distance might otherwise be an approximation, and it can’t be quite sure that it actually is within the required distance. I’m trying to improve this behavior in a new movement script that I’m writing.
In an open area, it should behave as expected, though.
What I was seeing was happening in wide open/unobstructed areas.
There was a single target destination in open level ground with no obstacles or other mesh cuts in between and agents were moving towards the target from different directions.
It made me add my own code to check if remainingDistance < EndReachedDistance, which then worked reliably.
Hi! I’m bumping in here because it seem I have the exact same problem.
Through some quick debugging i’ve found that “lastCorner” is setting itself to false, causing the chain:
As you wrote above it seems that it thinks there’s a corner there, though I’ve got no clue on where and how it sets it’s value. I’ve also found that enabling Funnel Simplification or not using tiles for A* seems to avoid the problem but I’d rather not rely on it if it causes performance issues down the road