Skip to content
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

Zoom error with globe disabled and viewing model from below #7594

Open
dminor112 opened this issue Feb 25, 2019 · 7 comments
Open

Zoom error with globe disabled and viewing model from below #7594

dminor112 opened this issue Feb 25, 2019 · 7 comments

Comments

@dminor112
Copy link

dminor112 commented Feb 25, 2019

image

  1. View tileset from below
  2. Try to zoom on.
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;
});
@hpinkos
Copy link
Contributor

hpinkos commented Feb 25, 2019

Thanks for reporting this @dminor112
Can you put together a Sandcastle example to reproduce this?

@hpinkos
Copy link
Contributor

hpinkos commented Feb 26, 2019

Thanks for the example @dminor112, but I still wasn't able to reproduce this. From that view, is the camera underground? Do you have the globe turned off?

@hpinkos hpinkos changed the title When I flip the model to the bottom,No matter which direction you roll, the middle wheel of the mouse will keep the model away from me. Zoom error with globe disabled and viewing model from below Mar 1, 2019
@hpinkos
Copy link
Contributor

hpinkos commented Mar 1, 2019

Thanks @dminor112, I see it now.

@bagnell any ideas here?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 1, 2019

Marking this priority - high because it also effects the asset preview window for tilesets that haven't been positioned on cesium.com0

@lilleyse
Copy link
Contributor

I updated the sandcastle so it's a bit easier to trigger the bug: Sandcastle

I may look into this as part of other camera fixes. A similar problem happens when zooming to terrain when viewing it from underground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants