Pathfinding - Nav3D Doc

Docy Child

Pathfinding

To find a path between points A and B, you must:

1) Get an object of type Path by calling the

				
					Nav3DPathfindingManager.PrefetchPath(Vector3 _PointA, Vector3 _PointB)
				
			

This method will only create an instance of Path and register it with Nav3D, but no pathfinding will be performed.

2) On the created Path object, call the method:

				
					UpdatePath(
                Vector3? _Start = null,
            	Vector3? _Goal = null,
            	int? _Timeout = null,
            	bool? _Smooth = null,
            	Action _OnSuccess = null,
            	Action<PathfindingError> _OnFail = null
)
				
			

Values ​​of overloaded parameters:

  • Vector3? _Start – starting point of the path. The parameter must be passed if you want to change the starting point of the path.
  • Vector3? _Goal – the end point of the path. The parameter must be passed if you want to change the end point of the path.
  • int? _Timeout – maximum path search time. In case the path search takes longer, the _OnFail callback will be executed if it is not null.
  • bool? _Smooth = null – whether it is necessary to smooth the found path.
  • Action _OnSuccess = null – callback that will be called after successful path finding
  • Action _OnFail is a callback that will be called if the path could not be found for any reason.

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...

Nav3DObstacle

To manage obstacles on the scene, the Nav3DObstacle component is designed. Attac...

Obstacle combinations

We will call obstacles with the selected processing mode “Runtime” as runtim...

Operations with obstacles

Regardless of the obstacle processing mode, the processing procedure consists of...

Deeper dive into obstacles

As already described above, in order for an obstacle to be taken into account du...

Nav3DAgent : Debug

The Nav3DAgent has an inspector that provides several useful functions to help w...

Nav3DAgent

As mentioned above, you can use the Nav3DAgent script as a component for your ga...

Chat Icon Close Icon
en_USEnglish