navcat docs
    Preparing search index...

    Function findLocalNeighbourhood

    • Finds all polygons within a radius of a center position, avoiding overlapping polygons.

      This method is optimized for a small search radius and small number of result polygons. Candidate polygons are found by searching the navigation graph beginning at the start polygon.

      The value of the center point is used as the start point for cost calculations. It is not projected onto the surface of the mesh, so its y-value will affect the costs.

      Intersection tests occur in 2D. All polygons and the search circle are projected onto the xz-plane. So the y-value of the center point does not affect intersection tests.

      Parameters

      • navMesh: NavMesh

        The navigation mesh

      • startNodeRef: number

        The reference ID of the starting polygon

      • position: Vec3

        The center position of the search circle

      • radius: number

        The search radius

      • filter: QueryFilter

        The query filter to apply

      Returns FindLocalNeighbourhoodResult

      The result containing found polygons and their parents