In general, different AI characters have different dimensions – radii and heights – and different walkability properties.
With that in mind, every navigation agent type (in general, every AI character type) needs its own navigation mesh, which is configured in the
Every agent type has:
- A unique name.
- Size and walkability properties:
- voxelSize: the size of the generated voxels in meters. must be a float value >= 0.025
- radius: agent radius in voxels; must be an integer value >= 1
- height: agent height in voxels; must be an integer value >= 1
- climbableHeight: Maximum climbable height in voxels (it can be considered as some maximum slope value); must be an integer value >= 0
- maxWaterDepth: Maximum walkable water depth in voxels; must be an integer value >= 0
Meters and Voxels
- When navigation mesh is generated, the navigation areas are split in small volumes, so-called tiles.
- The tiles have a fixed size of 8 m x 8 m x 8 m.
- The tiles must consist of an integer number of voxels (e.g. 0.1 m x 0.1 m x 0.1 m is a valid voxel size). Otherwise, voxel size will be adjusted internally to the closest valid value (e.g. 0.101 m x 0.101 m x 0.101 m would be adjusted to 0.125 m x 0.125 m x 0.125 m).
- The smaller the voxel size, the more accurate (and more expensive) the generated mesh will be. Minimum voxel size is 0.025 m x 0.025 m x 0.025 m (a smaller size will make the mesh generation fail).
Smart Object User Classes
See Off-mesh Navigation.
Note attribute version of tag Navigation in the first line. Whenever this file is updated, this attribute should be updated as well. This will force the users to re-export their maps.
Assignment of a Navigation Agent Type to an AI Character
Navigation agent type can be assigned to an AI character using the property NavigationType, as on the following image: