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.

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