- Home /
Question by
Nition · Jan 31, 2015 at 10:31 AM ·
rayboundsvector math
Get the closest point on a Bounds to a Ray
I want to get the closest point on a Bounds (unrotated) to a given Ray.
There's ClosestPointOnBounds, but that takes a point rather than a ray. There's IntersectRay, but that only tells me if the ray hits the bounds at all.
What I actually want to do specifically is see whether a ray ever goes within x distance of a Bounds, but I haven't been able to find or deduce a formula for it. Does anyone have the maths for this?
Comment