I tried bypassing the entity API and constructing a model directly but it still looks like the model is under the surface. To test this I drew a sphere using the max coordinate in the glTF file (661590.1875, 244.36329650878906, -5450425.5), but the center of the sphere is clearly underground. I think this is potentially a problem with the data.
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
//globe : false
});
var scene = viewer.scene;
var camera = viewer.camera;
var model = scene.primitives.add(Cesium.Model.fromGltf({
url : '../../SampleData/test/test.gltf',
modelMatrix : Cesium.Matrix4.IDENTITY,
upAxis : Cesium.Axis.Z
}));
model.readyPromise.then(function(model) {
// Zoom to model
var controller = scene.screenSpaceCameraController;
var r = 2.0 * Math.max(model.boundingSphere.radius, camera.frustum.near);
controller.minimumZoomDistance = r * 0.5;
var center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
var heading = Cesium.Math.toRadians(230.0);
var pitch = Cesium.Math.toRadians(-20.0);
camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, r * 2.0));
}).otherwise(function(error){
window.alert(error);
});
var position = new Cesium.Cartesian3(661590.1875, 244.36329650878906, -5450425.5);
var blueEllipsoid = viewer.entities.add({
name : 'Blue ellipsoid',
position: position,
ellipsoid : {
radii : new Cesium.Cartesian3(2000000.0, 2000000.0, 2000000.0),
material : Cesium.Color.BLUE
}
});
``
![underneath.PNG](https://global.discourse-cdn.com/cesium/original/2X/e/ecbc78746c4b499a0bb7d4647cdf6313703e426c.png)