So, I’m creating an artificial intelligence character. He can detect, follow and attack me if, naturally, I’m in a navmesh.
As you can see, there is a void between the player (grey) and the AI (orange).
Now, I want the AI to stop trying to move toward me if the void separates us, so I check if he can’t reach me. I know I can use either AIMoveTo’s “On Fail” exec or HasPartialPath, but…
“On Fail” only gets triggered if I’m not in a navmesh, so, it would only work if it was like this.
If I’m in a navmesh, no matter if the AI can’t actually reach the destination, it will say the path will succeed.
What I want the AI to do is, no matter if I’m in a navmesh or not, check if it can’t reach the destination.
How should I do this?