1. A concise explanation of the problem you're experiencing.
3dtiles is a little bit inclined, I want to change the angle of the 3dtiles
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var boundingSphere = new Cesium.BoundingSphere(Cesium.Cartesian3.fromDegrees(121.6184585, 31.1288196, -18.99991009), 560.7095979);
var Sunkingtileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: './3dtiles/Qinxi/3DTiles.json',
maximumScreenSpaceError : 1,
maximumNumberOfLoadedTiles : 1000
}));
Sunkingtileset.readyPromise.then(function (Sunkingtileset) {
var cartographic = Cesium.Cartographic.fromCartesian(Sunkingtileset.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 20);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
viewer.camera.flyToBoundingSphere(boundingSphere, {duration: 3});
Sunkingtileset.modelMatrix = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45)), translation);
});
As shown in the code, I want to turn the 3dtiles model to 45 degrees in the Z axis but not in effect
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Because my 3dtiles model has a little bit of tilt
4. The Cesium version you're using, your operating system and browser.
1.41 Chrome