Do not move camera when setting trackedEntity

Thanks for the answer. My use-case is slightly different. I want to track the entity once it starts moving and stop tracking once it stops moving. The only thing I need is the camera to just rotate when the tracking starts instead of jumping and rotating.

I think that this could be easily done with some matrix operations but I don’t understand how they work. I need to compute a north-east-up vector from two cartesians.

BTW this is my use case: https://www.paragliding-mapa.cz/mapa/cesium/15
Try rotating or moving the camera and then start flying with the + button or key Up. The camera jumps. While moving, rotate the camera, then stop with button or key Down. Now start flying again and the camera jumps again.