• Disables all polys not connected to provided start poly refs.

    Parameters

    • navMesh: NavMesh

      the nav mesh to prune

    • startPolyRefs: number[]

      poly refs to start the flood fill from, can be retrieved with navMeshQuery.findNearestPoly

    Returns void

    Example

    const navMeshQuery = new NavMeshQuery(navMesh);

    const nearestPolyResult = navMeshQuery.findNearestPoly(point, {
    halfExtents: { x: 2, y: 2, z: 2 },
    });

    if (!nearestPolyResult.success) return;

    floodFillPruneNavMesh(navMesh, [nearestPolyResult.nearestRef]);