//returns the vector of the next point
    public Vector3 getCurrentPathPoint(Vector3 currentPos)
    {
        //verifies that there is a path
        if (path == null)
        {
            return(Vector3.zero);
        }

        //grabs the path point
        PathPoint point = path.getCurrent();

        //checks if able to change path
        if (point.isInRange(currentPos, path.rangeOfChange))
        {
            return(path.next().transform.position);
        }
        else
        {
            return(point.transform.position);
        }
    }