I’ve spent an entire day looking through examples, source and the forum and I can’t figure out how to answer this question.
I have a surface route composed of points in ellipsoid coordinates (X,Y,Z). I have broken the route down into segments and I have picked strategic camera positions that guarantee line of sight to all the points of a segment (this is all done outside of Cesium). I am going to animate a target along this route, and I want the appropriate camera to follow it. This is done and working.
What I don’t like about my prototype is the visual effect of constantly panning as the target moves. I would much rather leave the camera alone as my target is moving across the view, and only turn it when the target is about to go off the viewport. In other words, I want the camera to do lazy following. Unfortunately, I can’t see an easy way to translate ellipsoid coordinates to window (viewport) coordinates. Am I missing something really obvious (perhaps because I’m too tired)? Is there a different way to accomplish this?
I’d like to take this opportunity to thank you all for helping me so far. I can finally see the light at the end of the tunnel for my project and it’s all because of Cesium and the tremendous work you’ve done.
Happy New Year!