I am rendering 3D Model to my application by loading gltf file. I am adding Model to cesium viewer and also zoom to the desired position.
I have a question regarding HeadingPitchRoll. In my KML (attached doc.kml) there is LookAt heading/tilt /range values and in Placemark Model orientation heading/tilt/roll.
Here is my code :
var position = Cesium.Cartesian3.fromDegrees(Long , Lat, Altitude);
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
var orientation = new Cesium.ConstantProperty(Cesium.Transforms.headingPitchRollQuaternion(position, hpr));
var entity = viewer.entities.add({
name: gltf_filePath,
position: position,
orientation: orientation,
model: {
uri: gltf_filePath,
minimumPixelSize: 500,
maximumScale: 1 }
});
The model shape rendered correctly but the position is not correct. My question is how I will convert the tilt value to pitch?