Mark layer as just cutout

Hello.

Is there a way to mark a specific layer in unity to just cutout. For example I have objects on the default layer. I would like this layer to just cut the navmesh so the agent cannot walk in spaces where a default layer object is. Right now it does this but some objects have the navigation on top of them as well. (for example a table with a flat top)

I can put a navmesh cut on each object but this is very time consuming and doesn’t seem like the optimal way to achieve this.

Thanks

Hi

You can add the RecastMeshObj component to those objects and adjust the settings to make the object surface unwalkable. Currently there’s no way to do this globally per layer, I’m afraid.

1 Like

Could really use this sort of feature right now! I’ve got a flat road mesh that follows some terrain contours, and I need the recast graph to split the navmesh along the edges of the road, but not cut out the road. That way I can use penalties to keep agents mostly on the road but allow them to walk off under certain circumstances. Seems like a similar thing may be possible with RecastMeshObjects, but our issue is that its a sandbox building game, and there’s thousands of objects that need to influence these splits, so a layermask solution would be vastly preferable.

Is such a thing impossible, or just not widely demanded enough to devote time to? If it is possible, would you have any quick tips on how to modify the rasterization to support splitting based on physics layers?

Hi

Yes, the recastmeshobj component can accommodate this, and that’s the recommended solution for this use case.
It works best in the beta version.