Question by
judasPriest_ · Nov 20, 2018 at 03:21 AM ·
ainavmeshnavmeshagentbakechase
NavMeshAgent isn't chasing the player
Hi. I am trying to make an enemy chasing. But the enemy doens't recognize the player at all. Just goes somewhere and stays. Here is my inspector and code:
` public GameObject target;
private NavMeshAgent agent;
void Start()
target = GameObject.Find("Player");
agent = GetComponent<NavMeshAgent>();}
void Update(){
agent.destination = target.transform.position; }`
ss.png
(53.7 kB)
Comment
Your answer
Follow this Question
Related Questions
Navmesh dont work! 0 Answers
ai patrol and chase question 0 Answers
NavMeshLink don't work in correctly in certain area 0 Answers