rayIntersection
Checks if a ray from a player's eye location intersects with this OBB. Optimized version that minimizes object creation.
Return
The distance to the intersection point, or -1 if no intersection
Parameters
The eye location of the player
The maximum distance to check
Ray/segment intersection against this OBB from an explicit origin and direction. Identical slab math to the Location overload, exposed for swept projectile detection: testing the segment a fast projectile traversed between ticks (origin = last position, direction = normalized travel, maxDistance = distance moved) catches arrows that a single-sample AABB overlap test tunnels straight through.
Return
distance to the nearest intersection, or -1 if none within range
Parameters
ray origin X (world space)
ray origin Y (world space)
ray origin Z (world space)
ray direction X (should be unit length)
ray direction Y (should be unit length)
ray direction Z (should be unit length)
maximum distance along the ray to consider