Linecast doesn't work at all

I’m using a single navmesh graph with a sphere on it that tries to LineCast to the player. The code always returns true (obstacle found) pointing to the a vertex in the bounding node of the sphere. Even if the player is stood next to the thing. What am I doing wrong?

    void Update()
    {
        GraphNode node = AstarPath.active.GetNearest(transform.position, constraint).node;

        GraphHitInfo hitInfo;
        Debug.DrawLine(Player.GetFeetPosition(), transform.position);
        if ((node.Graph as IRaycastableGraph).Linecast(transform.position, Player.GetFeetPosition(), null, out hitInfo))
        {
            Debug.DrawLine(transform.position, hitInfo.point, Color.red);
        }
        else
        {
            Debug.DrawLine(transform.position, hitInfo.point, Color.green);
        }
    }

Hi

Do you think you could post a Screenshot?

That is very odd. I can’t see anything wrong in your code.

I know some linecasting bugs have been fixed in the beta (available here: https://www.arongranberg.com/astar/download), but I can’t remember a bug which would cause this behavior… Might make sense to try it though.

Also, the player seems to be below the ground, are you sure the closest point on the navmesh to the player’s feet is actually reasonable?