Forcing the camera to stay horizontal (camera tutorial)

I think one easy way to do this is to lock the camera to a fixed point, and then the user can look around freely but not be able to move away. This is described here: vertical polyline cannot be explored