Click or drag to resize

Pathfinding

AIManual / Base Types / Game framework / PathfindingPathfinding Geometry

Pathfinding

Navigation mesh pathfinding.

Contents
Overview

Pathfinding system represented by three objects:

Screenshot999999453.png
Setup

First, let's setup a scene.

Screenshot999999511.png

Second, one should create main object Pathfinding.

Screenshot999999512 2.png

Next, pathfinding calculations geometry should be set up. One should select Ground object and add Pathfinding Geometry Tag object to it. As a result scene's "ground" will be interpreted as a geometry that is taken in account during pathfinding calculations.

Screenshot999999513.png

Same operation should be performed for objects in the scene.

Screenshot999999514.png
Build

When initial setup is done, one can perform navigation mesh calculation. To do so, select main Pathfinding object and press Build button (which is placed under object settings). After that navigation mesh will be displayed in the scene.

Screenshot999999515 2.png
Test

For pathfinding testing, press Test button. When it is pressed, test mode is being enabled. In order to test pathfinding, press left mouse button and drag it to destination.

Screenshot999999516 2.png
Pathfinding Geometry

Apart from main Patfinding object и and Pathfinding Geometry tags, there is Pathfinding Geometry object. With this object one can add pathfinding obstacles.

Screenshot999999517.png
Properties
Name Description
Cell Size The width and depth resolution used when sampling the source geometry. The width and depth of the voxels in voxel fields. The width and depth of the cell columns that make up voxel fields. A lower value allows for the generated meshes to more closely match the source geometry, but at a higher processing and memory cost.
Cell Height The height resolution used when sampling the source geometry. The height of the voxels in voxel fields.
Min Region Size The minimum region size for unconnected (island) regions. The value is in voxels. Regions that are not connected to any other region and are smaller than this size will be culled before mesh generation. I.e. They will no longer be considered traversable.
Merged Region Size Any regions smaller than this size will, if possible, be merged with larger regions. Value is in voxels. Helps reduce the number of small regions. This is especially an issue in diagonal path regions where inherent faults in the region generation algorithm can result in unnecessarily small regions.
Max Edge Length The maximum length of polygon edges that represent the border of meshes. More vertices will be added to border edges if this value is exceeded for a particular edge. A value of zero will disable this feature.
Max Edge Error The maximum distance the edges of meshes may deviate from the source geometry. A lower value will result in mesh edges following the xy-plane geometry contour more accurately at the expense of an increased triangle count.
Detail Sample Distance Sets the sampling distance to use when matching the detail mesh to the surface of the original geometry. Impacts how well the final detail mesh conforms to the surface contour of the original geometry. Higher values result in a detail mesh which conforms more closely to the original geometry's surface at the cost of a higher final triangle count and higher processing cost.
Detail Max Sample Error The maximum distance the surface of the detail mesh may deviate from the surface of the original geometry.
Agent Height Minimum height where the agent can still walk.
Agent Radius Radius of the agent.
Agent Max Climb Maximum height between grid cells the agent can climb.
Pathfinding Max Nodes Maximum number of search nodes to use (max 65536).
See also
AIPathfinding Geometry