I have a Nav Mesh Agent
and a FPS controller. I want agent to follow FPS when Fps Enter a trigger…
I tried something but it doesn’t work
using UnityEngine;
using UnityEngine.AI;
public class hedefbul : MonoBehaviour
{
public GameObject target;
public NavMeshAgent agent;
void OnTriggerEnter()
{
agent.SetDestination( target.transform.position );
}
}