Map interaction and Camera update

Hi everyone,
in the application that I am developing the client periodically receives the navigation data from the server (lat, long and heading every 100 ms).
The camera correctly follows the entity from behind, but since I update the camera every time the navigation data arrives (I have to set the camera because I want to follow the entity from behind and I have found no other way than to act directly on the camera), I am no longer able to interact with the map. I would like that if the user interacts with the map the camera stops following the entity and that the user can, using a button, choose to return to follow the entity.

What is the correct approach to do this?

I will try to write an example on SandCastle.

Thank you

I found this solution, any suggestions to improve it are welcome:
Example

1 Like

@stardast, thank you for posting an update. I am happy to hear that you at least found a basic solution.

First of all, use requestAnimationFrame() instead of setInterval() will let your animation more smoother.

As you said, you want navigation animation and a camera behind, so why not consider CZML? It support multi-part CZML(Cesium Sandcastle), And you could set camera view with viewFrom firstly and change its angles what ever you want.