I have been using "viewer.trackedEntity = entity" till now to make the camera follow a moving entity which follows a particular route/polyline. It works fine as long the route is smooth. However, when there are sharp frequent changes in route the camera starts to give jerky feeling which ruins the look and feel. To avoid that jerky feeling i am trying to implement my own camera animation logic and here's what I am trying to achieve:
1) To move the camera only along the major direction vector. To understand this better you can see this drawing: https://preview.ibb.co/gaGHtd/cesium_dev.png
2) To rotate the camera to align with current segment if there is major heading change.
Can someone point me in the right direction? What camera functions will come in handy while developing this kind of animation? If you have any rough sketch about how this can be achieved then it would be really helpful. Thanks!