Create a bounding box smaller than the level, and constrain the camera to never move outside of that?
The camera is defined by two things, position and view direction.
Constraining the position to a box is trivial, sure, but the problem is constraining the view direction so the limits of the map are never visible.
My camera view direction vector can have any value except having the Y component pointing up (to the sky).
So I'm interested in knowing what kind of math could be used in this case.