Raycast doesn't not include nodes which are above normal height


#1

Hey,

I’m trying to include stairs into my game, but when I’m generating Raycast Navmesh, it just ignores the elevations or make really low(below the colliders which stairs have) nodes.
Example

And also - my graph options:

How to solve it?


#2

Maybe try increasing the Walkable Climb


#3

When i try to do that, then the generated graph just ignore the elevations


#4

In my setup Walkable Height is 2 and Walkable Climb is 1.5 it bakes the mountains that are really high


#5

The recast graph explicitly does not generate a mesh that is very accurate on the y axis because that additional accuracy is not needed for pathfinding most of the time and it would only slow things down. Usually you rely on physics to position the characters accurately on the ground every frame which is far more accurate than the navmesh will ever be.

In your case in does look like the colliders for the stairs might not be included in the recast graph’s layer mask though, are you sure that they are?


#6

Yes, they are surely included, because when I change Walkable Height to 2.5 and Walkable Climb to 0.5 then it creates something like this: