ai pathfinding project getting started scene problems

I cannot get the getting started scene to work fully. The scene is set up according to the documentation, but it doesn’t seem to work. I get the ai character (a capsule in this case) to move and try to follow the path, but it doesn’t follow the graph all the time. In the following video you can see that it goes off the graph and turns to early and then doesn’t go high enough (and therefore gets caught on the edge and moves down towards the goal due to colliding with the wall and having to walk into the walk). What could cause this?

Here’s the video:
Video of AI in editor

Here’s the code for the testAStar script:

using UnityEngine;
using System.Collections;

using Pathfinding;

public class testAStar : MonoBehaviour 
{
	
	//The point to move to
	public Vector3 targetPosition;
	public Vector3 targetDefaultPos = new Vector3(0,0,0);
	public GameObject targetObj;
	
	public Seeker seeker;
	
	public CharacterController controller;
	
	//The calculated path
    public Path path;
    
    //The AI's speed per second
    public float speed = 100;
    
    //The max distance from the AI to a waypoint for it to continue to the next waypoint
    public float nextWaypointDistance = 10f;
 
    //The waypoint we are currently moving towards
    private int currentWaypoint = 0;
 
	public void Awake()
	{
		targetObj = (GameObject)GameObject.Find("target");
	}
	
    public void Start() 
	{
        //Get a reference to the Seeker component we added earlier
        seeker = transform.parent.GetComponent<Seeker>();
		controller = transform.parent.GetComponent<CharacterController>();
		//if(targetDefaultPos.Equals(Vector3.zero) )
		//{
        	targetPosition = targetObj.transform.position;
		//}
		//else
		//{
			//targetPosition = targetDefaultPos;
		//}
        //Start a new path to the targetPosition, return the result to the OnPathComplete function
        seeker.StartPath(transform.position,targetPosition, OnPathComplete);
    }
    
    public void OnPathComplete(Path p) 
	{
        Debug.Log ("Yey, we got a path back. Did it have an error? "+p.error);
        if (!p.error) 
		{
            path = p;
            //Reset the waypoint counter
            currentWaypoint = 0;
        }
		
    }
 
    public void FixedUpdate() 
	{
        if (path == null) 
		{
            //We have no path to move after yet
            return;
        }
        
        if (currentWaypoint >= path.vectorPath.Length) 
		{
            Debug.Log ("End Of Path Reached");
            return;
        }
        
        //Direction to the next waypoint
        Vector3 dir = (path.vectorPath[currentWaypoint]-transform.position).normalized;
		Debug.Log ("Dir: " + dir.ToString() + " to waypoint " + currentWaypoint );
        dir *= speed * Time.fixedDeltaTime;
        controller.SimpleMove(dir);
        
        //Check if we are close enough to the next waypoint
        //If we are, proceed to follow the next waypoint
        if (Vector3.Distance(transform.position,path.vectorPath[currentWaypoint] ) < nextWaypointDistance ) 
		{
            currentWaypoint++;
            return;
        }
		
    }
	
	public void Update()
	{
		
	}
	
}

My gameObject i attached the seeker, CharacterController and testAStar script in a hierarchy like this:

EmptyGameObject (parent) – [CharacterController and Seeker components attached here]

       |-Capsule GameObject (child) -- [testAStar script]

I do reference the seeker and character controller correctly.

Your nextWaypointDistance is too high, it’s going to the next point too early. Reduce it by a large amount.