Now that we know how navigation mesh generations works, let's look at the different parameters you can set to generate them in more detail.
We'll look at how to do these parameters with RAIN using the following steps:
The NavMesh setup
Now let's look at some of the important parameters:
For example, here is a NavMesh from our demo with a cell size of 0.01:
You can see the finer detail here. The following is the navigation mesh generated with a cell size of 0.1:
Note the difference between the two screenshots. In the former, walking through the two walls lower down in our picture is possible, but in the latter with a larger cell size, there is no path even though the character radius is the same. Problems like this become greater with larger cell sizes. The following is a navigation mesh with a cell size of 1:
As you can see, the detail becomes jumbled and the mesh itself becomes unusable. With such differing results, the big question is how large should a cell size be for a level? The answer is that it depends on the required result. However, one important consideration is that as the processing time to generate one is done during development and not at runtime, even if it takes several minutes to generate a good mesh then it can be worth it to get a good result in the game.
The Size, Walkable Radius, and Cell Size parameters are the most important parameters when generating the navigation mesh, but there are more that are used to customize the mesh further:
The preceding is a screenshot of a walkable object with a slope.
This is a screenshot of the navigation mesh with the step height set to connect adjacent blocks.
You can see a screenshot of the navigation mesh with the walkable height set to allow going under the higher block.
These are the most important parameters. There are some other parameters related to the visualization and to cull objects. We will look at culling more in the next section.
18.117.119.206