Fix "Up" when rotating around trackedEntity

26 views
Skip to first unread message

maaron...@gmail.com

unread,
Feb 19, 2020, 7:35:02 PM2/19/20
to cesium-dev
When you track an entity or point and try to orbit the camera around it, it is very easy for the camera to end up in some disorienting position. 

For example: a point at the top of Mt. Everest. The only way to orbit where the camera stays in the 'expected' orientation is if you drag the mouse perfectly horizontally on the screen. If you have any vertical movement in your mouse the camera very quickly ends up with the center of Earth somewhere other than 'down'.

Is there a simple solution to this issue, similar to fixing north in the up position via ```scene.camera.constrainedAxis = Cesium.Cartesian3.UNIT_Z```

Untitled.png


maaron...@gmail.com

unread,
Feb 19, 2020, 7:49:30 PM2/19/20
to cesium-dev
Well....I answered my own question lol

```scene.camera.constrainedAxis = Cesium.Cartesian3.UNIT_Z``` does the trick....

Omar Shehata

unread,
Feb 20, 2020, 12:45:17 PM2/20/20
to cesium-dev
Thanks for posting your solution!

What kind of app are you working on?

maaron...@gmail.com

unread,
Feb 20, 2020, 1:01:04 PM2/20/20
to cesium-dev
Its a general tool for the company I work at. Mainly for keeping track of what countries the owner has visited and managing the companies assets and employees who are in many countries.
Reply all
Reply to author
Forward
0 new messages