Support Forum

Can't get the graph to recognize some walkable areas

Unity 2020.3
A* 4.2.15
Layered Grid Graph

I have unity terrain with some Digger tunnels. A* worked perfectly… almost. If you look at the picture, you can see at the arrow location that the grid doesn’t connect. I have zero problems using the same character with a character controller setup, traversing that area. It’s not any steeper or narrower or shorter than the rest of it. The top tunnel exit works fine (where the 2 is). There’s a second tunnel with the same exact problem. The only theory I have is that the terrain cutout function (something in unity, but Digger uses), is causing an issue. The upper tunnels are cut in a close to 90 degree slope, and the lower tunnels aren’t as steep. I have tried turning up and down every relevant setting to no avail.

Is there a way for me to change these squares into walkable terrain? Is there a way to find out a node’s information/array location?

The dev might want to test this out, too. They could make a piece of terrain, use the cutout tool to make a hole, and put a walkable plane past the hole, and see if it generates properly.

I verified the AI does not path properly past the point, but does path properly to other points in the tunnels and terrain.

One More picture. This shows an overhead shot with the Digger generated terrain disabled, so you can see where the cutouts and unity terrain are.

A real ugly temporary solution, but I figured out digging out the unity terrain above the hole causes A* to correctly find that part of the cave. The only thing I can think of at this point is there’s something weird going on with the raycast detecting terrain when it goes through multiple layers and gets close to 0 height (0 y).
c4

Hi

This package uses the unity physics engine directly for the queries, so if those tunnels have weird artifacts I think it unfortunately must be caused by Unity’s terrain cutout functionality not being perfect.