Graph incorrect, depending on obstacle position (2D)

So I’ve been using this pathfinding project while prototyping my game and everything worked well enough. Now I started building an actual level and noticed something odd : Depending on where I place my obstacle (simple rectangle), the graph isn’t always correct.

For prototyping I just had one obstacle with the scale (6/1) placed at the position (-3 / 2.5) and the graph looked fine . But when I move the obstacle to a different position (for example (0 / 3)) , the graph is wrong and the pathfinding doesn’t work properly (see picture 2)

The pathfinding system is set up like this .. I’m working in 2D with the latest version of unity and the pathfinding project. I hope someone can help me out, thanks in advance

Hi

Note that what the scene view shows is the connections between nodes, so the nodes themselves are positioned where 8 lines meet. Red cubes mean that a node is unwalkable.

Your obstacle is positioned precisely between two nodes. Your collision testing mode is set to ‘Ray’ which means that it will ask the physics system if the exact location of the node is obstructed by any obstacle. In this case the node positions are on the edge of the obstacle. Maybe you want to change the collision testing mode to ‘Sphere’ (which will act as a circle in 2D mode).

That mostly fixed my problem. The path the seeker takes is still not quite optimal sometimes when I’m close to an obstacle (and I’m sure I can tweak things a bit to fix that) but now it doesn’t get stuck anymore.
Thanks a lot! For both the answer and the excellent product.