Pathfinding - Nav3D Doc

Docy Child

Поиск пути

Для поиска пути между точками A и B необходимо:

Получить объект типа Path , вызвав метод

				
					Nav3DPathfindingManager.PrefetchPath(Vector3 _PointA, Vector3 _PointB)
				
			

Данный метод лишь создаст экземпляр Path и зарегистрирует его в Nav3D, но поиск пути осуществлен не будет.

Для созданного объекта Path вызовите метод

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

Значения перегруженных параметров:

  • Vector3? _Start точка начала пути. Параметр необходимо передавать если вы хотите поменять точку начала пути.
  • Vector3? _Goal конечная точка пути. Параметр необходимо передавать если вы хотите поменять конечную точку пути.
  • int? _Timeout максимальное время поиска пути. В случае, если поиск пути длится дольше, произойдет выполнение колбека _OnFail, если он не равен null.
  • bool? _Smooth = null необходимо ли сглаживать найденный путь.
  • Action _OnSuccess null - колбек, который вызовется после успешного нахождения пути
  • Action _OnFail колбек, который вызовется в случае, если путь не удалось найти по какой-либо причине.

Agent log

In the second section, you can get the contents of the agent log by clicking on ...

Debug drawing

In the first section, you can visualize the agent and his nearest environment. T...

Создание и настройка описания агента из кода

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

Сочетания препятствий

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

Операции с препятствиями

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

Немного глубже о препятствиях

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

Nav3DAgent : Debug

The Nav3DAgent and its inheritors have an inspector that provides several useful...

Nav3DAgent

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

Chat Icon Close Icon
ru_RURussian