- Home /
Question by
jzkitschio · Dec 13, 2017 at 07:18 PM ·
navmeshnavmeshagentnavigationbake
Need help with navmesh,Already bake Navmesh but still got error
I already bake a NavMesh but still got Error that said "Setdestination can only be use on active agent that's on Navmesh"
here is that picture to makesure that I already bake a Navmesh https://imgur.com/1B9cOLP
Code* public Transform target; public NavMeshAgent agent;
// Use this for initialization
void Start () {
agent = GetComponent<NavMeshAgent>();
}
// Update is called once per frame
void Update () {
target = GameObject.Find ("Player").gameObject.transform;
agent.SetDestination (target.position);
}
}
Ty in advance
Comment
Answer by jzkitschio · Dec 13, 2017 at 07:35 PM
I just test everything on the normal cube it's work just fine but when I use it on Import 3d model it's always show the error