@Ruban txesmi presents the best solution and far better code( always) than I do. Take his advice.
I do reference you to my prior post which I suggest camera in a box. Txesmi presents the end evolution of using an invisible box entity for camera collision.

@txesmi you're still the best under the sun!