Large Terrain with Structures graph question


#1

Hello!

My game utilizes a large terrain (open world) with structures sprinkled throughout.
I am considering using a Recast Graph for the terrain but I am uncertain how to get pathing set up within the structures.

What I am looking for is for the graph to allow for entrance into a structure - through a doorway and then confine the path to the structure interior, including stairs, hallways, etc. without allowing the pathing object to go through walls and such.

I can get the graph to recognize the structure as an obstacle but I can’t figure out how to get the graph to propagate into the open doorway and up the stairs, into rooms, etc.

Can I use mesh colliders for the structures or do I need to add colliders that use the obstacle layer?

Any and all help is appreciated.


#2

Hi

Most likely the resolution of the graph is too low. Check the ‘cell size’ field of the recast graph.
You can use mesh colliders, or even just the rendered meshes if you check ‘rasterize meshes’ in the recast graph settings. If your world is large I recommend just rasterizing colliders though, for performance reasons.

An easy way to see how the graph has been rasterized is to set the ‘Max Edge Error’ setting on the recast graph to zero (you should not do this in your final game though).
If you post a screenshot of the building and mesh