You can pass an orientation parameter to the flyTo method to tell it how it should be oriented. So for example, instead of:
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(+nextPosition.lon, +nextPosition.lat, viewer.camera.positionCartographic.height),
duration: 0.1
});
``
You can set the camera’s current orientation:
viewer.camera.flyTo({
orientation : {
heading : viewer.camera.heading,
pitch : viewer.camera.pitch,
roll : viewer.camera.roll
},
destination : Cesium.Cartesian3.fromDegrees(+nextPosition.lon, +nextPosition.lat, viewer.camera.positionCartographic.height),
duration: 0.1
});
``
But now it looks like the issue is that the center of the screen is no longer the center of the view (if you tilt too much, the center gets closer to the horizon). If you want to fix that you could just use the camera’s position:
https://cesiumjs.org/Cesium/Build/Documentation/Camera.html#positionCartographic
Instead of using pick on the ellipsoid.