-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintain camera heading on zoom #4639
Comments
Thanks @rutsky, this is something that has come up a few times on the forum as well. var viewer = new Cesium.Viewer('cesiumContainer');
var camera = viewer.scene.camera;
viewer.scene.preRender.addEventListener(function() {
camera.setView({
orientation: {
heading: 0,
pitch: camera.pitch,
roll: camera.roll
}
});
}); |
@hpinkos thanks for the workaround! |
CC #2816 |
I am attempting a fix for this, but I'm a little stuck. My attempted solution was to grab the heading, pitch, and roll from the camera at |
My employer is working on a corporate CLA. Should be good to go on Monday and I'll open the PR. |
@wallw-bits thanks for working on the fix, looking forward to it! |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/d/msg/cesium-dev/Kv_dSET4Bjs/Z0XJp1JIBQAJ If this issue affects any of these threads, please post a comment like the following:
I am a bot who helps you make Cesium awesome! Thanks again. |
By default panning Earth in 3D has nice property that no matter how I pan tiles on Earth surface will always be oriented "vertically":
When zoom to mouse is used (either using mouse wheel, or by holding right mouse button), Earth axis is being tilted (the further away from screen center zooming is done, the stronger axis tilt):
If I disable zooming to mouse position (by hardcoding in Cesium source code) or if I zoom exactly to screen center this issue is not reproduced.
This is very inconvenient when you navigate over Earth using panning and zooming and at some point see that tiles on the map are rotated.
Also mentioned here: https://groups.google.com/d/msg/cesium-dev/Kv_dSET4Bjs/Z0XJp1JIBQAJ
The text was updated successfully, but these errors were encountered: