You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling camera.lookAtTransform with a matrix that does not equal the identity matrix, the camera is capable of zooming past the Earth's surface. I discovered that this is because of this check in ScreenSpaceCameraController
Since the camera transform is no longer the identity matrix, the controller's ellipsoid is replaced with the UNIT_SPHERE (where I was previously using the default WGS84 ellipsoid).
On zoom, we therefore end up using the wrong ellipsoid to compute the camera height here.
This makes the controller think the camera is higher than it actually is, and therefore the zoom speed doesn't scale properly.
@NateRex The camera controller definitely seems to assume certain use case for adjusting the camera transform... Not great.
To me, it looks like that first condition is used for tracked entity views. I assume the ellipsoid is being set to the unit sphere there to make any ellipsoid calculations faster–Calculations on a sphere are faster than an oblate ellipsoid like what's used for the earth.
In my opinion, it would be better if ScreenSpaceCameraController did not change the ellipsoid or globe internally. Instead it would be up to EntityView.js to set the ellipsoid to controller's ellipsoid to something else.
What happened?
Calling
camera.lookAtTransform
with a matrix that does not equal the identity matrix, the camera is capable of zooming past the Earth's surface. I discovered that this is because of this check inScreenSpaceCameraController
Reproduction steps
Sandcastle example
https://sandcastle.cesium.com/?src=Camera.html
Environment
Browser: Chrome
CesiumJS Version: 1.121.0
Operating System: Windows
The text was updated successfully, but these errors were encountered: