I've a tileset with heights moved.
Googling I found this code to displace the model:
var heightOffset = 500.0;
var tileset = widget.scene.primitives.add(new Cesium.Cesium3DTileset({
url: '../cesium-ordesa/Scene/Teide_1.json'
}));
tileset.readyPromise.then(function(tileset) {
var boundingSphere = tileset.boundingSphere;
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0, -2.0, 0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
// Position tileset
var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
console.log(tileset.modelMatrix);
});
The tileset.modelMatrix is set without errors, but nothing changes.
I've tried different values in heightOffset, but doesn't move.
I compiled and used the last Cesium 3d-tiles branch code.
Any idea?
Thanks in advance.