Hi Guys.
Look at this example:
var tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(159048),
})
);
heightOffset = 100
tileset.readyPromise.then(function(tileset) {
var boundingSphere = tileset.boundingSphere;
// 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);
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
console.log(tileset.modelMatrix);
});
Basically, with the code above I adjust the tileset height.
1 - Can I make some fit to be able to change heading, pitch and roll of a tileset using tileset.readyPromise.then(function(tileset)?
2 - Should I use this transform? https://cesium.com/downloads/cesiumjs/releases/1.27/Build/Documentation/Transforms.html#.headingPitchRollToFixedFrame.
Note: I know that I can change using Cesium Ion - Adjust Tileset Location, but I need this adjust in tileset.readyPromise.then to fix tileset position.