• Builds a TileCache and NavMesh from the given positions and indices. TileCache assumes small tiles (around 32-64 squared) and does some tricks to make the update fast.

    Parameters

    • positions: ArrayLike<number>

      a flat array of positions

    • indices: ArrayLike<number>

      a flat array of indices

    • Optional navMeshGeneratorConfig: Partial<{
          borderSize: number;
          bounds?: [bbMin: Vector3Tuple, bbMax: Vector3Tuple];
          ch: number;
          cs: number;
          detailSampleDist: number;
          detailSampleMaxError: number;
          expectedLayersPerTile: number;
          maxObstacles: number;
          maxSimplificationError: number;
          maxVertsPerPoly: number;
          mergeRegionArea: number;
          tileCacheMeshProcess?: TileCacheMeshProcess;
          tileSize: number;
          walkableClimb: number;
          walkableHeight: number;
          walkableRadius: number;
          walkableSlopeAngle: number;
      }>
    • Optional keepIntermediates: boolean

      if true intermediates will be returned

    Returns TileCacheGeneratorResult