Taos API Reference
    Preparing search index...

    Function raycastHeightField

    • March a ray against a height query. step is the coarse march step in world units — use about one heightmap texel; the hit is refined by bisection to ~1/64 step. Points where the query returns null are treated as "no ground" (the ray passes over the void beyond the field).

      Parameters

      • heightAt: HeightQuery
      • origin: readonly [number, number, number]
      • dir: readonly [number, number, number]
      • maxDistance: number
      • step: number

      Returns TerrainRaycastHit | null