- Home /
Question by
Videogamedeveloper · Jan 01, 2015 at 08:25 PM ·
navmeshagenttargets
Tell if navmeshagent has reached target?
Hi I would just like to know how to use a script to tell if a navmesh agent has reached their target. This is my current navmesh agent script.
using UnityEngine; using System.Collections;
public class AgentScript : MonoBehaviour { public Transform target; NavMeshAgent agent;
void Start ()
{
agent = GetComponent<NavMeshAgent>();
}
void Update ()
{
agent.SetDestination (target.position);
}
}
Comment
Your answer
Follow this Question
Related Questions
Root Motion and Navmesh Agent 0 Answers
NavMesh Agent rotation problem 3 Answers
WayPoints navMeshAgents help 0 Answers
Can you use NavMesh agents to vary driving/handling model? 0 Answers
Make unity NavMesh ignore terrain trees? 4 Answers