-
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
Camera moveStart and moveEnd events don't work when camera is very close to the ground #4753
Comments
@bagnell is there a reason the |
To add to the description of this issue. The same behavior is even more obvious with camera.changed event. In fact, the event is not triggered at all when the camera is below the ellipsoid. This is very clearly noticeable when using a terrain provider since it is possible to navigate under the level of the ellipsoid. And to be more specific, this issue occurs with the zoom and the translation navigation but not with the rotation. Steps to reproduce
Expected BehavriorThe moveStart, moveEnd and changed events are triggered whether the camera is above or below the ellipsoid. (In our use cases we navigate near the surface of the terrain and very often under the ellipsoid.) Example codevar viewer = new Cesium.Viewer('cesiumContainer');
var camera = viewer.camera;
camera.position = new Cesium.Cartesian3(1408166.1338912349, -4136627.945644175, 4630485.211009045);
camera.percentageChanged = 0.001;
camera.changed.addEventListener(
function()
{
var height = Cesium.Cartographic.fromCartesian(camera.position).height;
console.log(height);
}.bind(camera)); |
Thanks for expanding on this @DannyLebel! |
This event is almost never triggered when navigating an indoor 3D tileset. |
Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/SwoFMPNm5_g
This is particularly noticeable in 2D
It looks like we are using
EPSILON6
, which is not significant enough when the camera is very close to the ground: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Scene.js#L2349The camera changed event does a much better job because it takes the camera height into consideration: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Camera.js#L336
The text was updated successfully, but these errors were encountered: