tilting is not working correctly, when tilting it brings us below the map

289 views
Skip to first unread message

r.van....@ncim.nl

unread,
Sep 13, 2018, 11:20:52 AM9/13/18
to cesium-dev
1. A concise explanation of the problem you're experiencing.
When we are runniong a Cesium application and trying to tilt the map, sometimes we end up below the surface of the map. It looks like we see the map from below.
We tried to disable tilting by adding the following line:

viewer.scene.screenSpaceCameraController.enableTilt = false

But this doesn't seems to work

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

viewer.scene.screenSpaceCameraController.enableTilt = false


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

Try to achieve a better user experience

4. The Cesium version you're using, your operating system and browser.

1.44.0

Omar Shehata

unread,
Sep 14, 2018, 8:40:19 AM9/14/18
to cesium-dev
Thanks for letting us know! I've noticed that too, and it's definitely something I'd like to improve. We haven't been able to pin down exactly when it occurs. If you have a way to consistently recreate it that'd definitely help!

r.van....@ncim.nl

unread,
Sep 17, 2018, 4:02:05 AM9/17/18
to cesium-dev
Op donderdag 13 september 2018 17:20:52 UTC+2 schreef r.van....@ncim.nl:

Hi Omar,

Thank you for the reply
in a sandbox app these are the settings we are currently using.

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.scene.screenSpaceCameraController.enableCollisionDetection = true;
viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100.0;
viewer.scene.screenSpaceCameraController.minimumCollisionTerrainHeight = 100;

it occurs consistenly in our application

r.van....@ncim.nl

unread,
Sep 17, 2018, 4:51:00 AM9/17/18
to cesium-dev
Hi Omar,

I managed to create a way to consistently recreate it.
When you are zoomed in to the maximum, collision detection works fine.

When you are not zoomed in and the detailed tiles are not loaded yet, you can tilt through the map.

Collision detection only seems to work when the most detailed layer from the map is loaded.

I hope this helps,

kind regards

r.van....@ncim.nl

unread,
Sep 17, 2018, 8:10:21 AM9/17/18
to cesium-dev
I added this video for explanation.

When zoomed in tilting works as expected, when zoomed out tiling can bring me below the map.

https://drive.google.com/open?id=0B1JftRPeakpVLWhvbkxIdENjMUE

Do you have an idea to mitigate the problem?

many thanks

rutg...@gmail.com

unread,
Sep 17, 2018, 4:31:01 PM9/17/18
to cesium-dev

Omar Shehata

unread,
Sep 18, 2018, 11:03:37 AM9/18/18
to cesium-dev
Thanks for recording that and for the specific instructions! This will definitely help.

I found an issue that's been tracking this. I linked to your instructions there:


Hopefully this help contribute to a fix soon! 

steven...@gmail.com

unread,
Sep 24, 2018, 1:34:49 PM9/24/18
to cesium-dev
We experience the problem (the camera goes below the terrain), too. To duplicate it:

1. Visit our site (http://wbskiing.com/desktop.asp).
2. Shift+click anywhere on the terrain and push your mouse away from you (which lowers the camera) until the camera stops (due to a collision with the terrain).
3. Without releasing the mouse button or Shift key, pull the mouse back toward you to raise the camera, and then again push the mouse away from you to lower the camera.

>>The camera will (almost always) go below the surface of the terrain and Cesium will crash with an "Invalid array length".

Note this seems to only happen if you perform the above steps without releasing the mouse button after the camera "collides" with the terrain. So to duplicate it, it's best to perform this test immediately after loading the page.

Omar Shehata

unread,
Sep 25, 2018, 9:04:02 AM9/25/18
to cesium-dev
Thanks for the additional test case! There is a workaround described here that might work for that particular case:

Reply all
Reply to author
Forward
0 new messages