crashcat docs
    Preparing search index...

    Function castRayVsBox

    • Analytic ray-vs-box (slab test), replacing the generic GJK convex cast for boxes. Not an approximation: the gjk path already casts against a sharp box of |scale|·halfExtents with zero convex radius (setBoxSupport under INCLUDE_CONVEX_RADIUS), so this is bit-equivalent geometry, exact rather than iterated to a 1e-3 tolerance. Reporting follows jolt's BoxShape::CastRay: the entry hit behind the treatConvexAsSolid gate, and the exit hit when collideWithBackfacesConvex is set.

      Parameters

      • collector: CastRayCollector
      • settings: CastRaySettings
      • originX: number
      • originY: number
      • originZ: number
      • directionX: number
      • directionY: number
      • directionZ: number
      • length: number
      • shape: BoxShape
      • subShapeId: number
      • _subShapeIdBits: number
      • posX: number
      • posY: number
      • posZ: number
      • quatX: number
      • quatY: number
      • quatZ: number
      • quatW: number
      • scaleX: number
      • scaleY: number
      • scaleZ: number

      Returns void