GridGraph Collision testing and diagonal values

Hi! I’ve actually really enjoying adapting Astar to my needs so far, but I have no idea how to achieve this.

Take a look at this picture:

How would I go about allowing a path diagonally between these two collisions, as it would normally be possible if they weren’t there? It might seem trivial, but it’s actually very important in this particular case. I’ve tried adjust collision check diameter, and type. I imagine I’d have to change something in the graph generator itself?

Thanks in advance - it’s a great product!


That is a very uncommon request, so I have no toggle for it in the settings. However, it can very easily be added.
Around line 948 in GridGenerator.cs
`if (cutCorners) {
for (int i=0; i<4; i++) {

	if (corners[i] >= 1) {`

`if (cutCorners) {
for (int i=0; i<4; i++) {

	if (true) {`

Make sure that ‘Cut Corners’ is enabled in the Grid Graph settings.

Works like a charm. Thank you so much. Swift reply, and easy solution!

I was looking for this also and works perfectly. Thank you!