I’ve attempted to read what appear might be answers but none quite apply. I am writing a game with a very large, hilly terrain. Throughout the game the player has to from “base” to “base” and fight the bad guys. I would like to constrain each set of bad guys to their own base, i.e. not bake my ENTIRE terrain. And since each “base” is spread out, I’d like to keep the sniper in his tower, etc.
I’ve tried adding an invisible plane with a mesh terrain to cover the area I’d like “bad guys” to patrol but that either floats above or sinks below the hills. Any ideas?
I’d be interested in this too. I am using GAIA to create an open world level and would like to restrict my “creature” from roaming over the entire terrain.
Short of using some sort of invisible wall and/or barriers to restrict the AI movements, it would be nice to have an option to only partially bake an area of the terrain.
Well, there’s Nav Mesh Obstacle class, however, this sounds like a problem that should be solved on AI level, not on navigation level.
Navigation system seems to completley lack any sort of layers, which would prevent you from designating passable/non-passable zones for different groups of agents. Meaning this should be probably tackled on AI level, where an agent would not go into area, even if navigation tells it to do it.
Alternatively, you could try rolling out your own navigation. For example:
I really like it. The “sliding_window_terrain” scene seems to be what we’re interested in. It creates an enclosing box on the Terrain. Although it does not actually create a NavMesh. When I run it I get run time errors such as ’ “SetDestination” can only be called on an active agent that has been placed on a NavMesh’. But this is a nice trove of scripts. This “enclosing box” does solve another problem - keeping the player from running off the edge of the world.