Ancestors Legacy

Ancestors Legacy

Not enough ratings
[MOD] Navigation mesh
By DC_vipeout
Configuring an area where characters are able to walk. Navmesh, NavModifierVolumes etc
   
Award
Favorite
Favorited
Unfavorite
Setting up NavMesh
So to let our squads, peasants and other pawns know where they can go and where they can't we need to properly set a NavMesh.

1. Add a Nav Mesh Bounds Volume actor to map. It will also add RecastNavMesh-Default actor to map. (This one contains main NavMesh configuration parameters).


  • In editor you can press the P key will show/hide the area that the NavMesh covers.

2. Now set up size of Nav Mesh Bounds Volume so it contains almost whole Landscape. To set a a size select NavMeshBoundsVolume actor and change size in Brush Settings.



3. Navmesh shouldn't be bigger than Map Bounds Marker. It's a good practice to make Navmesh little smaller than landscape/map bound marker.




Official Epic documentation of NavMesh.
https://docs.unrealengine.com/en-US/Resources/ContentExamples/NavMesh/index.html



Important: If you have made any changes to the NavMesh you should regenerate tiles before playing! How to do it and more info about Tile System can be found HERE.
Navmesh types
We have some navmesh types. Every type have own color.

  • Orange - AncNavArea_Obstacle - this one is used as an obstacle. Squads and single pawns should avoid this area and never go over it. It's almost same as no navmesh with one simple difference. If single unit will found itself on this area (becaouse of fight animation or being charged on) it should be able to move outside it to normal area. So use this type to mark areas where you don't want units to go.



  • Cyan - AncNavArea_Retreat - when using normal move this will be ignored. Squads only avoid this area when using Retreat. And only for players with team index 0 will use this. Team with index 1 will ignore this area. Single pawns always ignore this area. It is only used for squads. It is autmatically added to every player start (so if you retreat, your squads should avoid running throudh enemy base).

  • Blue - AncNavArea_Retreat2 - Same as above, only for team with index 1. Team with index 0 will ignore it.



  • Yellow - AncNavArea_Fast - Well it is not used anymore so you can ignore it. This was used to set faster path (for example: on the center of the bridge so the squads will go through center of bridge and not at the edges of bridge).

  • No color - NavArea_Null - Set area without navmesh. No squad, no single unit should ever be able to enter area without navmesh. If by any means unit will enter this area bad things happen (like blocked movement or crashed game).


Important: If you have made any changes to the NavMesh you should regenerate tiles before playing! How to do it and more info about Tile System can be found HERE.