I'm using NavmeshAgent to make the enemy chase the player. Below is my script
public Transform goal;
private NavMeshAgent agent;
private bool playerInSightRange;
private bool playerInAttackRange;
private void Awake()
{
agent = GetComponent<NavMeshAgent>();
}
private void FixedUpdate()
{
ChasePlayer();
}
private void ChasePlayer()
{
Debug.Log(agent.SetDestination(goal.position));
}
However, the enemy is not moving unless my player arrives at a certain location, beside the fridge to be specific. I'm really confused right now and any help would be appreciated. I have attached my navmesh map below. Thank you!