[This is preliminary documentation and is subject to change.]

The xz-plane voxel size to use when sampling the source geometry. [Limit: >= MinCellSize] [Units: World]

Namespace: org.critterai.nmgen
Assembly: cai-nmgen (in cai-nmgen.dll) Version: 0.4.0.0 (0.4.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public float XZCellSize { get; set; }
Public Property XZCellSize As Single
	Get
	Set
public:
property float XZCellSize {
	float get ();
	void set (float value);
}

Remarks

Also known as the 'grid size' and 'voxel size'.

This parameter effects how accurately the final navigation mesh can conform to the source geometry on the xz-plane. E.g. How close it can follow the edges of obstructions. It has side effects on most parameters that apply to the xz-plane.

The primary governing factor for choosing this value is the value of the agent radius. Start with (maxAgentRadius / 2) for outdoor environments. For indoor environments or when more accuracy is needed, start with (maxAgentRadius / 3).

This parameter has a large impact on memmory useage. The smaller the value, the higher the memory cost during the build. So there are special considerations when the source geometry covers a large area. The best solution is use multiple polygon meshes built for use in a multi-tile navigation mesh. Otherwise it may be necessary to lower the resolution. If this is the case, set the cell size based on the source geometry's longest xz-axis. Start with a value of (longestAxis / 1000), then reduce the value as performance and memory allows.

See Also