Setting Walkable areas on the Terrain

A suggestion for something to add to Unity.

At the moment what I do with my terrain is have 2 copies of it.

  1. the standard terrain, the one thats get drawn, collided against etc
  2. a copy of this terrain but painted with holes, showing the ares where you can not walk
    So when I generate the navmesh I disable the standard terrain and use the holy terrain to generate the navmesh (and as a bonus, navmesh generates quicker) this gets disabled when I’m playing the game, i.e. its only for navmesh generation

This works great until, I want to change the terrains heights somewhere, then both terrains are out of sync.
Best solution would just to have the single terrain and just the ability to paint a navmesh walkable (or the opposite, not walkable) on the terrain

Possible?

The ability to “paint” a texture on a terrain, then build a navmesh from the painted areas, is a question that pops up about once a year. There’s finally a tool that works with navmeshes here: NavMesh Generator | Behavior AI | Unity Asset Store but I have not used it so cannot tell you if it’s good. The price is reasonable to give it a try.

1 Like

OK thanks I will prolly grab that then. It looks a bit of a roundabout way to do it, creating extra terrains and then destroying them, afterwards. It would be so much easier if they just added another splat alpha texture to the terrain (which you could choose either to display as an overlay over the terrain), its what they do already now with the holes I assume with the Terrain.asset

1 Like

OK it seems as if that tool has an error with larger terrains, mine was 1km x 1km ~1m per vertex
Out of bounds errors, I could get it working if I lowered the detail but then it looked terrible, and judging by the ratio even at maximum (if it didnt crash) it would still look pretty bad.

I think I will just have to do what Im currently doing, 2 meshes and paint holes in the one