Operations with obstacles - Nav3D Doc

Docy Child

Operations with obstacles

Regardless of the obstacle processing mode, the processing procedure consists of several stages:

  1. Collecting information about the geometry of the obstacle for each Nav3DObstacle.

    At this stage, a list of all geometries that form an obstacle is obtained, then they are combined (clustered).

    Let’s say there are several children in the transform hierarchy of the obstacle, each of which has a MeshFilter with a Mesh assigned. Accordingly, in this case, several lists of triangles that make up the meshes will be obtained. Next, for each list of triangles, the enclosing volume will be defined in the form of Bounds. Those lists whose Bounds intersect will be merged. We will call each such individual list an “obstacle volume.” The result is one or more obstacle volumes. This will be done for every Nav3DObstacle processed in the scene.

  2. Clustering with already processed obstacles.

    It is checked whether the volumes of the newly procсessing obstacle intersect with the volumes of obstacles already in the storage. If yes, then clustering occurs with obstacles already added. The result is a new list of obstacle volumes.

  3. Removing obsolete volumes of stored obstacles from storage.

    Those volumes that intersected with the volumes of the newly processing obstacle and that were included in the new (clustered) volumes are considered obsolete.

  4. Next, navigation graphs are constructed for new volumes.

    These volumes are then added to the obstacle storage.

Removing an obstacle from a storage consists of the following steps:

  1. From the storage, a list of all volumes containing triangles of the obstacle being removed is obtained (each volume can contain triangles of several obstacles).
  2. For each volume, the triangles of the obstacle to be removed are removed from the resulting list.
  3. Further, only volumes in which triangles still remain after removal are considered. For these volumes, the embracing Bounds are recalculated.
  4. All volumes from the original list are removed from the obstacle storage.
  5. All remaining volumes with recalculated Bounds are clustered and added back to the obstacle storage.

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