What determines the surface that the graph uses as a walkable surface?

In an attempt to change the ground from a flat plane to a terrain surface, i had issues specifying which surface, on which height should be used as the walkeable surface for the graph ?
Can it be specified using a layer or tag or what is the default behavior ?
In my previous tests i only had a single plane or terrain in the scene, but as soon as i have multiple (even deactivated ones) it gets messy.

So by default, a graph scan will take into account any mesh with a collider (including Terrain Colliders), so long as it’s within the bounds you set in the AstarPath component. You can use tags to get more granular control over what is an obstacle, versus terrain, how that terrain is scanned, etc.

What issues were you having with your scan? Is just nothing walkable? Any red squares indicating unwalkable nodes?

As is often the case with beginner questions, the solution was quite simple …
At some point, i had accidentally unchecked the box at “height testing”. Without height testing, the graph stayed flat, which i interpreted to it using the flat plane in the scene instead of my terrain. Now with the height testing checked, it checks the 100 units above it and now maps the terrain as expected.

I was literally looking for the “Ray length” and “Mask” properties, which i couldn’t find anymore.

Haha that’s totally understandable. Thank you for letting us know that you figured it out, and thanks also for posting your solution here to the forum!

Take care and let us know if you need anything else :+1:

1 Like