Camera Heading

Fix camera heading when north is more in the xz-plane than the xy-plane. Fixes #1152.