Question

How would I set a constraint for the rotation/tilt of the 3D globe so that I don't end up staring at the north / south pole... however way I mouse-drag.

Or is there a way to listen in and tilt the globe back gently such that the north/south poles will always eventually end up 'vertical'?

(I'm using version b26)

Was it helpful?

Solution

I think what you are experiencing is the camera's constrainedAxis. By default, both CesiumWidget and Viewer set constrainedAxis to Cartesian3.UNIT_Z. This keeps the globe oriented north and prevents the earth from rotating to an unfamiliar view. While this is subjective behavior, in the past we found many people preferred it (we may change it again in the future if enough people disagree). The good news is that it's easy to change at any time by just assigning constrainedAxis to be undefined. If you have a handle to the current scene, you can simple do: scene.camera.constrainedAxis = undefined;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top