@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Function raycast

    • Cast a ray into the scene and resolve with the first hit.

      Parameters

      Returns Promise<RaycastHit | null>

      The first hit, or null if the ray hit nothing.

      If no host handler is wired, the host returns an error, or it times out.

      import { raycast } from "@urth/metatell-sdk/input";

      const hit = await raycast({ x: 0, y: 1.6, z: 0 }, { x: 0, y: 0, z: -1 });