navcat docs
    Preparing search index...

    Function moveAlongSurface

    • Moves from start position towards end position along the navigation mesh surface.

      This method is optimized for small delta movement and a small number of polygons. If used for too great a distance, the result set will form an incomplete path.

      The resultPosition will equal the endPosition if the end is reached. Otherwise the closest reachable position will be returned.

      The resulting position is projected onto the surface of the navigation mesh with

      Parameters

      • navMesh: NavMesh

        The navigation mesh

      • startNodeRef: number

        The reference ID of the starting polygon

      • startPosition: Vec3

        The starting position [(x, y, z)]

      • endPosition: Vec3

        The ending position [(x, y, z)]

      • filter: QueryFilter

        The query filter.

      Returns MoveAlongSurfaceResult

      Result containing status, final position, and visited polygons

      getPolyHeight.