Hello,
I have been using this fabulous library successfully for several years for tiled models projected on the ground. I would now like to use a tiled model in space and be able to turn around it. I use the last version 1.103 but it doesn’t work (probably because of me). My CesiumJS code is basic with:
var viewer = new Cesium.Viewer('cesiumContainer',
{
globe : false,
animation: false,
timeline: false
}
);
var tileset = new Cesium.Cesium3DTileset({
url: 'https://www.space.uni/Run1_Test/tileset.json',
maximumScreenSpaceError: 4,
maximumMemoryUsage: 1024,
skipLevelOfDetail: false
});
tileset.readyPromise.then(
function(tileset) {
viewer.scene.primitives.add(tileset);
viewer.trackedEntity=tileset;
var pos = new Cesium.Cartesian3;
pos=tileset.boundingSphere.center;
console.log(pos.x,pos.y,pos.z,tileset.boundingSphere.radius);
pos.z=pos.z+tileset.boundingSphere.radius*2.0;
viewer.camera.flyTo(
{
duration : 0,
destination : pos,
orientation: { heading : Cesium.Math.toRadians(0),pitch : Cesium.Math.toRadians(0),roll : 0.0},
}
);
console.log(tileset.boundingSphere.center);
console.log(viewer.camera.position);
}
).otherwise(
function(error) {
console.log(error);
}
);
the console.log display:
387451.7192665803 188616.3279968052 -3082615.385122608 875258.7809637417
Run1_Test.html:73 $e {x: 2137969.281194064, y: 188616.3279968052, z: -3082615.385122608}
Run1_Test.html:74 $e {x: 2137969.281194064, y: 188616.3279968052, z: -3082615.385122608}
everything seems to load and work but nothing is displayed on the screen except the starry background. The mouse commands seem to be blocked. I have no error message in the chrome console. If I use viewer.zoomTo() the problem is the same…
Do you detect an error on my part? Do you have an example of functional code? Thank you for advance,