There are a few ways to limit Camera or Player rotation.
In Blueprints , you can make use of the Camera Manager:
Another way would be to create a custom “Camera Manager” Class : Easy way(Open the Player Controller , and create one under Defaults)
And under the Defaults of the new created Camera Manager Class , you have access to the rotation limits.
Ockert.