Seeker doesn't move after find the path

Hello, I’m a beginner of this path finding package…studying ‘get started manual’

void Start() {
seeker = GetComponent();
charControl = GetComponent();

    seeker.StartPath(transform.position, target.position, OnPathComplete);

}


void OnPathComplete(Path p) {
    if (!p.error) {
        path = p;
        currentWaypoint = 0;
    }
    else
        Debug.Log(p.error);
}

void Update() {
    if (path == null) return;

    if (currentWaypoint >= path.vectorPath.Count) return;

    Vector3 dir = (path.vectorPath[currentWaypoint] - transform.position).normalized;
    dir *= speed * Time.deltaTime;
    Debug.Log("dir=" + dir);

    charControl.SimpleMove(dir);

    if (Vector3.Distance(transform.position, path.vectorPath[currentWaypoint]) < 0.2f) {
        currentWaypoint++;
        return;
    }
}

/////
this script works finding the path(seeker.StartPath()…)…
but the character game object(capsule game object) doesn’t to move toward the target transform…

So I printed the ‘dir’ variable…
Strangely, it produces the only ‘y axis value’, even though it is on the x-z plane…
??

dir=(0.0, -3.6, 0.0)
dir=(0.0, -3.0, 0.0)
dir=(0.0, -3.3, 0.0)
dir=(0.0, -3.7, 0.0)
dir=(0.0, -11.2, 0.0)
dir=(0.0, -14.3, 0.0)

I use Unity 4.6.9 and a* path free version 3.7.4

i

Likely your grid is a bit below your character. Iit is only instructed to move towards the next waypoint which is further than 0.2 units away, but that waypoint might be right below the character. To solve this you can try checking for the distance along the XZ plane only. Something like

var nextDir = path.vectorPath[currentWaypoint] - transform.position;
nextDir.y = 0;
if (nextDir.magnitude < 0.2f) {
    ...
}