Nav3DParticularResolutionRegion : Some points

  • The use of the resolution regions is intended to solve problems related to the insufficiency of the graph detailing in tight areas of space, such as, for example, narrow tunnels, small holes through which it must be possible to find a path. But also in such regions, you can set the size of the minimum bucket larger than the bucket size set on the entire scene. This can be useful when, on the contrary, you want to avoid over-detailing the search graph for some obstacles. Avoiding excessively high resolution of the navigation graph will have a beneficial effect on overall pathfinding performance.
  • An octree is a hierarchical structure in which the sizes of all buckets are always a multiple of each other’s size and from level to level the size changes with a multiplier of two (each next level contains buckets two times smaller than the previous one). So you can only specify the desired minimum bucket size. In fact, the actual minimum bucket size will be calculated relative to the size specified during Nav3D initialization. If, for example, at initialization, the minimum size was specified as 0.4, and you specify the desired minimum size as 0.3, then the size 0.2 will actually be chosen, since it should be a level lower and obtained from 0.4 divided by 2. If you choose the desired size as 0.7, then the actual size will be 0.8 since it must be a level higher and is multiplied by 2. Desired value 0.9 leads in result to 1.6 value. And so on.
  • If the obstacle is located inside the intersection of several regions with different minimum bucket sizes, the smallest value from the region values will be selected as the minimum bucket size during processing.
  • We recommend using regions as static objects that are on the scene at the time of processing all obstacles. The operation of adding/removing a region during the game will cause the navigation graph to be recalculated for those obstacles that are intersected by the region. The region is initialized by the OnEnable() and deinitialized by the DoDisable() events in the Nav3DParticularResolutionRegion respectively. So to initialize a region, you can create its prefab on the stage, to deinitialize it, make its GameObject inactive, or destroy it.