- Home /
Question by
JP313 · May 02 at 01:05 PM ·
ainavmeshnavmeshagent
Ai can't touch the ground.
I am making a enemy Ai script and when the enemy hit the ground this error pops up:
.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination (UnityEngine.Vector3) EnimyAi:Patroling () (at Assets/Scrips/EnimyAi.cs:50) EnimyAi:Update () (at Assets/Scrips/EnimyAi.cs:40)
.
Does someone have a solution?
Comment
iirc this means that your agents position when you call this function is too far away from any registered navmesh. Can you post a picture to show the situation when this error occurs?
Your answer
![](https://koobas.hobune.stream/wayback/20220613060100im_/https://answers.unity.com/themes/thub/images/avi.jpg)