[Bug Report] Terrain UpsideDown

Hi I think, I found a bug

After Camera related PR Merge

(https://github.com/AnalyticalGraphicsInc/cesium/pull/5603****) : Maintain camera heading, pitch, and roll on zoom

Camera controller allow to turn over the ground.

This can happen if you drag the ground when the terrain update is not over.

please review it

Thanks cesium team

shyoo.

Thanks for tracking this down!

I opened a new GitHub issue (https://github.com/AnalyticalGraphicsInc/cesium/issues/5837) to track, and there is some discussion on that Pull Request if you have any more input.

Thanks again!

Gabby

So this may not be a bug after all- In the case it might be intended behavior. See this pull request where we allow the camera to go underground while the terrain is still loading. If you think you’re still seeing a bug, let us know.

Thanks,

Gabby

I'll look further into it and see if there's any solution.

After Camera related PR Merge(https://github.com/AnalyticalGraphicsInc/cesium/pull/5603) : Maintain camera heading, pitch, and roll on zoom

In handleZoom function(in Scene\ScreenSpaceCameraController.js)

there are two setView calls : camera.setView(scratchZoomViewOptions)

And it makes terrainAdjustment skip(camera._suspendTerrainAdjustment = true) at camera.prototype.setView

So I modified handleZoom function:

//cancel camera suspendTerrainAdjustment right after setView calls

function handleZoom(object, startPosition, movement, zoomFactor, distanceMeasure, unitPositionDotDirection) {

camera.setView(scratchZoomViewOptions)

camera._suspendTerrainAdjustment = false; //added

camera.setView(scratchZoomViewOptions)

camera._suspendTerrainAdjustment = false; //added

}

It works for me.

It’s not perfect, but it’s enough for me until future camera improvements.

I hope it can help someone.

shyoo.

Hi Shyoo,

Thanks for the workaround, I’m g;ad it works for your purposes for now! We have a PR open from a community member that accomplishes something similar, but we’re not 100% sure it’s the right approach. We’ll hopefully reach consensus on the best path forward to fix this soon.

Thanks,

Gabby