yolkbot
    Preparing search index...

    Function rayVsBox

    • Slab-tests a ray against one oriented box, in the box's local space

      Parameters

      • origin: Position

        Where the ray starts

      • direction: Position

        The ray's direction; must be normalised

      • box: Collider

        The box to test against

      • maxDistance: number

        How far along the ray to look

      • normal: Position

        Receives the surface normal at the hit

      Returns number | null

      The distance to the hit, or null