Hello,
I am not sure if this is a bug or a feature.
I try to manipulate the camera's heading, pitch and roll. And it seems that the heading does the same rotation as the roll.
So using this:
viewer.camera.setView({
orientation : {
heading : h + 0.5,
pitch : p,
roll : r
}
});
has the same results like this:
viewer.camera.setView({
orientation : {
heading : h,
pitch : p,
roll : r + 0.5
}
});
Below code to reproduce this in the Sandcastle. You will first see the rotation using heading, then it will reset the camera's position and do the same rotation using roll. I think it should look different. Could you help me understand this? Thanks
var viewer = new Cesium.Viewer('cesiumContainer');
var h = viewer.camera.heading;
var p = viewer.camera.pitch;
var r = viewer.camera.roll;
var value = 0.5;
console.log(h);
console.log(p);
console.log(r);
var b = function() {
viewer.camera.setView({
destination : Cesium.Cartesian3.fromDegrees(13.305, 52.528, 3000000),
orientation : {
heading : h,
pitch : p,
roll : r
}
});
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(13.305, 52.528, 3000000),
orientation : {
heading : h,
pitch : p,
roll : r + value
},
});
};
viewer.camera.setView({
destination : Cesium.Cartesian3.fromDegrees(13.305, 52.528, 3000000),
orientation : {
heading : h,
pitch : p,
roll : r
}
});
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(13.305, 52.528, 3000000),
orientation : {
heading : h + value,
pitch : p,
roll : r
},
complete : b
});