- Home /
How to make EnemyAI trace Player Object without rotation?
I use nvAgent.destination=playerTr.position for tracing player object. It works, but I want to make it not to rotate while tracing player.
IEnumerator EnemyAction() { while (!isDie) { switch (enemyState) { case EnemyState.patrol:
if(count==0)
CreateTarPoint ();
Enemy_Move();
break;
case EnemyState.trace:
nvAgent.destination=playerTr.position;
break;
}
yield return null;
}
}
this is my code. Plz help me!
Comment