Hi There,
I’m experimenting with the 3.5 Navmesh and Navmesh Agent feature. I have a simple box ground which is Navmesh Baked and a sphere with a Navmesh Agent applied. I move around in the scene with the standard FPS controller. My problem is that when I run the program, the sphere follows me to where I am at startup but doesn’t turn if I move to a new position. It just stops at my first position. How can I have it follow me? Here is the C# code I am using… Any ideas?
using UnityEngine;
using System.Collections;
public class follow : MonoBehaviour {
public Transform m_Player;
// Use this for initialization
void Start () {
GetComponent<NavMeshAgent>().destination = m_Player.position;
}
// Update is called once per frame
void Update () {
}
}