fix:更改俯视角

This commit is contained in:
shijing 2024-04-03 17:27:01 +08:00
parent 145b971fdd
commit d120b827ae
1 changed files with 11 additions and 10 deletions

View File

@ -418,8 +418,6 @@ export default {
var url = "photon_tree.glb";
var height = 0;
viewer.entities.removeAll(); //entity
// 88.64349,
// 42.72285,
var position = Cesium.Cartesian3.fromDegrees(
88.64349,
42.72285,
@ -450,15 +448,18 @@ export default {
},
});
var destination_tree = Cesium.Cartesian3.fromDegrees(
88.64349,
42.72285,
900
88.64355,
42.715,
500
);
var roll_tree = Cesium.Math.toRadians(-100);
var hpr_tree = new Cesium.HeadingPitchRoll(heading, pitch, roll_tree);
var orientation_camer = Cesium.Transforms.headingPitchRollQuaternion(
destination_tree,
hpr_tree
var heading_tree = Cesium.Math.toRadians(1); //
var pitch_tree = Cesium.Math.toRadians(-30); //
var roll_tree = Cesium.Math.toRadians(0); //
var orientation_camer = new Cesium.HeadingPitchRoll(
heading_tree,
pitch_tree,
roll_tree
);
viewer.camera.setView({
destination: destination_tree,