Moving to locations §
- To make the AI move as close to the target as possible, using an acceptance radius of 0 is necessary
- This can cause the navigation to fail if it can’t quite reach it - in this case, you need to manually verify the distance to the wanted goal.
- Depending on why the move failed, it may be necessary to retry it
- None of these behaviors exist in the builtin MoveTo AITasks, but can be added into a custom one.
Finding paths §
- If the target you need to find a path to isn’t on the navmesh, you may need to project its location.
- This can still produce suboptimal results - for example, it might be desirable for the AI to approach the object from a different point. In this case, you may need to generate additional points around the object, project those into the navmesh, and see if any of them are better.
![](./attachments/Finding-paths-example-1.png)
- Here the target actor is in the middle, the four red spheres around it are the additional generated points. The white spheres are the projected nav locations. We can pick the best out of them depending on distance to the AI’s location.