I need to know the point on a line segment that is closest to an AABB. I know that the line definitely does not intersect the box.
As a possible simplification, one of the dimensions of the box is zero (most of the time) so finding the closest point on the line segment to one face is all that I need. (I could extend this to check all 6 faces of the AABB in the edge case)
Just to confirm
- The line is not infinite, it is defined by two points
- The box/face is also constrained and not infinite