Lock the camera on y axes?

Is there a way to stop the camera from jumping while the character does it?