Example #1
0
    private Vector3 followPath(Waypoint myPoint)
    {
        // If we have arrived at the Waypoint we were seeking, go to the next one
        if(myPoint.hasArrived(transform.position))
        {
            myPoint = myPoint.nextWaypoint;
            target = myPoint;
        }

        return seek(myPoint.Position);
    }