Eventually this problem will be 3D.
My player is looking forwards. There is an axis-aligned box on the screen (FOV is guaranteed to be 90, so boxes behind the player aren't considered.)
I want to get the coordinates of the point on box that is closest to the player's looking direction.
I.e., if the player turned towards the box, which point of the box would intersect with their line of vision first?