Support Forum

Cutting corners between points nodes

I’m struggling to find a way to stop my units cutting corners between two diagonally connect points in a point graph. Perhaps using a grid graph would be better here? However, here is an example screenshot:

As you can (hopefully) see, I’ve got a couple of objects with a simple 2D box collider – which have their z-depth modified, per the 2D tutorial, when instantiated, this updated the graph. However, the diagonal connections from bordering points are still in tact. Even though the 2D collider overlaps over these connections.

Is there a way of fixing this?

I’ve tried RVO Obstacles, but these simple cause the AI to cram itself in a corner, trying to reach the other side (to no avail) and the connection obviously still being there.



Make sure you have the Point Graph -> Raycast option enabled and that it is set to 2D physics.

But yes, a grid graph might be a better fit here in any case. It has an option called “Cut Corners” which handles this specific case.

Thanks Aron!

I did switch to a grid graph, however I am a bit worried about performance if the maps get very big. But I believe that it should be sufficient.

A* is great (bought the pro version a while back). And great effort on the support and documentation! Cheers!

A grid graph will be more efficient than a point graph if it gets very large in any case :slight_smile: