Limit the rotation of the camera to 90 degrees

We have the Pan and Tilt Movement and 2k “indoor cam mini”. It does great looking around when it was just on a table. We mounted it in the corner on a shelf and now it likes to look at the walls and not the room. How do we limit the rotation to be less than 90 degrees, like it is in the corner and we only want it to rotate inside the room and not look at walls?
I tried setting up active motion field but those move with the camera and do not help.