First I flyTo a location with particular orientation. When the camera animation completes I start animating a pin on a polyline and set viewer.trackedEntity = mypin so the camera starts tracking that pin but the problem is that it also resets my camera orientation which i specified in flyTo. Its exactly above the pin and too much zoomed in. How should I solve this problem? Here is the code:
var entity = viewer.entities.add({
name: ‘Start’,
position: cartesianArray[0],
billboard: {
image: Cesium.buildModuleUrl(‘Assets/Textures/redpin.png’),
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
scale: 0.6
}
});
viewer.camera.flyTo({
destination: cartesianArray[0],
orientation:{
pitch : Cesium.Math.toRadians(-40),
},
complete: function(){
viewer.trackedEntity = entity;
startAnimation();// pin animates on polyline
},
});
``