- Home /
Question by
Rodrigo188 · Jun 14, 2019 at 02:06 PM ·
navmeshnavmeshagentpathfindingpathpathfind
NavMesh Update Path
Hello guys, I`m trying to change enemy path once an object is destroyed but everything I`ve tried until now do not work and all couldn`t find the answer on other posts! Can you guys help? Thank You!
if (secondaryNexus == true) { // transform.LookAt(mainNexus); // transform.rotation = Quaternion.LookRotation(mainNexus.position); agent.SetDestination(secondaryNexus.position);
// transform.position += transform.forward * 5f * Time.deltaTime;
onChase = false;
}
else if( secondaryNexus == false)
{
agent.SetDestination(mainNexus.position);
}
Comment