Generation settings

These settings concern the generation of the Nav Mesh. Usually, the default values are more than perfect to start with, and so you should only touch these values if you know what you are doing. The following screenshot shows these settings:

The best way to learn about these settings is by playing with their parameters, first in an example map, then in your own maps. After that, you need to check the results of doing this (especially with the visual debugging tools that are presented in Chapter 12, Debugging Methods for AI - Navigation, EQS, and Profiling). To get you started, let's look at the main ones:

  • Tile Size UU: This parameter defines how fine the polygons that are generated are. Lower values mean a more precise navigation mesh, with more polygons, but also a slower generation time (and potentially more memory usage). You can see the effect of this parameter by turning on the Draw Triangle Edges in the display settings that are shown in the preceding screenshot.
  • Cell Height: This determines how high the generated cells are from the floor (which might result in connecting areas at a different height, so be careful).
  • Agent settings (Radius, Height, Max Height, Max Slope, Max Step Height): These settings are specific to your agents and should be specified appropriately. In particular, these are the minimum values an agent should have to traverse this Nav Mesh. As a result, the Nav Mesh will not be able to navigate with agents with smaller values than this, because the Nav Mesh is generated only for agents with these requirements. These settings are useful to generate an appropriate Nav Mesh for your agents, without wasting resources on a Nav Mesh with areas that your agents will never be able to navigate.
  • Min Region Area: This gets rid of certain artifacts of the Nav Mesh Generation that are too insignificant to navigate.

Many of the remaining settings are about optimization, and they can be overwhelming, especially for newcomers in AI Programming. Therefore, I decided to not include these details in this book. However, once you are confident about using the Navigation System, you can check the tool-tips of these settings and experiment with them so that you can learn about what they do.