[This is preliminary documentation and is subject to change.]
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)
|C#||Visual Basic||Visual C++|
Improves pathfinding appearance when using meshes that contain non-border. vertices. (E.g. Tiled meshes and meshes constructed using multiple areas.)
The only time updateCorners should be set to false is if a move or other optimization method is to be called next. Otherwise the corner data may become invalid.
Inaccurate locomotion or dynamic obstacle avoidance can force the agent position significantly outside the original corridor. Over time this can result in the formation of a non-optimal corridor. A non-optimal corridor can also form near non-border vertices. (I.e. At tile corners or area transitions.)
This function uses an efficient local visibility search to try to optimize the corridor between the current position and next.
The corridor will change only if next is visible from the current position and moving directly toward the point is better than following the existing path.
The more inaccurate the client movement, the more beneficial this method becomes. Simply adjust the frequency of the call to match the needs to the client.
This method is not suitable for long distance searches.