A* Pathfinding Project

Recast graph and static obstacles


I am using Recast graph and I can’t seem to find a place to put the layers for the obstacles.
If I just try scanning “as is” the walls are never defined as obstacles.
So the player can just walk through walls.

The floor is on the “floor” layer and the walls are on the “walls” layer.

It finds the floor perfect when I have the floor layer set under layers but the walls are never found(no place to add that layer that I can see for recast graph).
They all have colliders and meshes on them.

Any help would be great.



In recast graphs there is no difference between obstacles and ground. Everything is just the same polygon soup.
So in the recast graph you should set the layer mask to both the floor and walls layer.

You can optionally add the RecastMeshObj component to some components that you want to explicitly prevent the agent from walking on. Though I don’t think you will need it for this case.