Hi, I think it can still move with directly move to. So you could find the ‘best’ point that is inside the navmesh and directly move towards that. To find such a point, you could use an EQS query (generate points on the navmesh) and then score or filter them by e.g. Z-Distance and Distance.
To check whether it has left the navmesh, you could try to project the bots location to the navmesh using ProjectPointToNavigation (with only some Z-Distance in the query extent), if that fails then it should be outside the navmesh.
Not sure whether that will work with the navlink though, since there it can be outside the navmesh while moving.
First, this typically happens when you haven’t configured the navmesh correctly for your AI character capabilities (appropriate radius, appropriate path planning, etc.) You may want to adjust the navmesh (and maybe add invisible blockers) until this doesn’t happen.
Second, you can store the last point the character was on the navmesh inside an occasional tick(), and return to that point if the character ever finds itself outside the mesh.
Hi @chrudimer
Thank you very much for your response.
Yes, what you say works in most cases.
I found this thread that was very helpful and also very related to your solution.
However, in this specific case it doesn’t work…
The pawn is in the air.
The capsule is stuck on the edge of the wall.
And below the pawn there is a navigation mesh.
I think this specific case could be solved with a slippery capsule.
If it doesn’t get stuck on the edges maybe works…
I’m going to adjust the NavMesh parameters.
And I am going to implement a service to save the last navigable point.
I hope I can get the capsule not to get stuck on the edges of the walls as well.
I’ll let you know if I managed to fix it.