Nav3DPath: Pathfinding - Nav3D Doc

Docy Child

Nav3DPath: Pathfinding

To perform pathfinding you need to do: 

  1. Create a Nav3DPath instance using constructor new Nav3DPath().
  2. Call one of the following methods:

To search a path between 2 points:

				
					public void Find(
Vector3 _Start,
Vector3 _End,
Action _OnSuccess = null,
Action<PathfindingError> _OnFail = null
)
				
			

Parameters meaning:

  • Action _OnSuccess – successful pathfinding completion callback.
  • Action<PathfindingError> _OnFail – pathfinding fail callback, contains some info about error.

To search a path between more than 2 points:

				
					public void Find(
       Vector3[] _Goals,
       bool _Loop,
       bool _SkipUnpassableGoals = false,
       Action _OnSuccess = null,
       Action<PathfindingError> _OnFail = null
   )

				
			

Parameters meaning:

  • bool  _Loop – whether need  to loop the path (if true then the end and start points will be connected by path as well).
  • bool  _SkipUnpassableGoals – whether skip any point pathfinding to which was failed. If true, then the failure to find a path between any pair of points will lead to pathfinding abort and _OnFail callback to be invoked.

It is possible to repeat the last pathfinding procedure. It can be useful in case when the scene configuration has changed and the last found path is no longer relevant.

To do this, call the public void Update() method.

Nav3DSphereShell

Represents a spherical shell that is perceived by other agents as an object to a...

Nav3DEvader

There is also a separate controller, whose behavior consists of just avoiding ne...

Nav3DAgentManager

This class implements several methods to get a list of all Nav3DAgents located i...

Nav3DPathTester

We implemented a useful component (Nav3DPathTester), which can be used while bui...

PathfindingResult

Contains the pathfinding data and time statistics. Time statistics: public TimeS...

Nav3DPath: Events

For the convenience of notification when the pathfinding finished, the following...

Agent log

Here you can copy the contents of the agent log to the clipboard by clicking the...

Debug drawing

In this section, you can visualize the agent and his nearest environment. This s...

Creating and configuring an agent description from code

All Nav3DAgentDescription parameters configured in the description inspector c...

Nav3DManager

Nav3DManager is a helper static class. Can be useful for checking whether Nav3D ...

Nav3DInitializer

To use Nav3D in playmode, you need to initialize it. The Nav3DInitializer compon...

Nav3DObstacleLoader

To use the possibility of pre-baking obstacles on the scene in editor mode and t...

Chat Icon Close Icon
en_USEnglish