How do I lock the camera?

I have changed it from relative to world and it now looks like your screenshot but unfortunately the camera still flips 180 degrees when I change the player direction.