How can I limit the rotation of a Camera?

Updated my answer