I’m not sure what you call “viewport” (is it the wall?).
Anyway, I think your problem is that you would need continous collision detection (CCD) if you don’t want to go through a wall whatever the speed of the object/camera. See for eg:
- Clipping through imposters? - #11 by Evgeni_Popov
- Collision and Mesh Intersection is not registered/taken into account when the object is moving too fast
If you don’t want to use a physic engine for CCD, this may get you started: