Layered Grid Graph not showing path with Cube on Terrain

Hello,

I’m using the Layered Grid Graph with the intent of having a ground, a road and general obstacles. I’m using a terrain for the Ground Layer, and cubes set to a Road Layer. The cube is sitting on top of the graph with a scale of 0.3, and the AStar Path has the Obstacle Layer Mask set to Everything except the Road.


This generates a graph with no paths. However, if I increase the size of the cube to a scale of 1 then it starts to work.

Why would changing the scale cause the paths to start showing. My goal is to just have the cubes at or slightly above the terrain. I’ve also tried quads and planes too.

Note: This may not be the best approach, so I’m open to other suggestions. The key thing though is that I need a terrain, and I need to be able to control the movement via Layer.

Also, I have a sample project available if necessary.

I note that you have the ground layer included in your collision testing mask. If you note the visualization, you can see that the green capsule extends slightly below the nodes. This means that obstacles will be detected even if they are slightly below the node. In particular, your ground will make pretty much every node unwalkable. I would recommend removing the Ground layer from the collision testing mask.

Ty Aron!
That did the trick.

1 Like