CesiumGS / CesiumGS/cesium

Zoom error with globe disabled and viewing model from below

Open
#7,594 8 comments 0 reactions 0 assignees View on GitHub
category - camera priority - high type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

![image](https://user-images.githubusercontent.com/3451886/53647616-eec97e00-3c0b-11e9-9d10-110fbbfec2de.png)

1. View tileset from below
2. Try to zoom on.

```js
var viewer = new Cesium.Viewer('cesiumContainer', {
timeline:false,
animation:false,
vrButton:false,
sceneModePicker:false,
infoBox:true,
skyBox: false,
scene3DOnly:true
});
viewer.scene.globe = undefined;

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: '../../../../Apps/SampleData/Cesium3DTiles/Classification/Photogrammetry/tileset.json',
maximumScreenSpaceError : 1.0,
maximumMemoryUsage: 4096 // GPU Memory
}));
tileset.readyPromise.then(function(tileset) {
viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0, -1.0, 0));
});

viewer.homeButton.viewModel.command.beforeExecute.addEventListener(function(commandInfo) {
// Fly to custom position
viewer.camera.flyToBoundingSphere(tileset.boundingSphere);
// Tell the home button not to do anything
commandInfo.cancel = true;
});
```

Contributor guide

Open the contributing guide

Research direction

Run the provided reproduction with the globe disabled and inspect the viewer.zoomTo and camera.flyToBoundingSphere paths while viewing the tileset from below. Trace where zooming produces the error and add a regression check if an existing camera test covers this behavior. Done means zooming from below no longer errors in the supplied setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.