Syncing cameras across clients

I’m writing a virtual world framework application using cesium, and I need to sync the camera’s members across all clients. This was accomplished with an earlier version by checking the movement of the different modes down in the camera controllers. With the latest changes(b17), the api would suggest that the previously used objects are now private. Question: What the best way to detect that a client is currently interacting with the scene and then update the other clients cameras?

I was going to check through all of the CameraEventAggregator for any movement, and if true I was going to send new camera location. The previous implementation had sent the actual movement amounts to the other clients, and then set those values.


You should check out the Cesium/OpenLayers 3 integration example -

The Cesium camera is updated when the ‘view changed’ event in OL3 is fired. There are no ‘camera changed’ events that you can listen to in Cesium, but you can save the current camera state, check to see if it changed in the render loop, and then update other client’s cameras.