Hi All,
I have a split screen setup and working except for Zoom on the cloned camera. When I started each viewer, I set
sceneMode: SceneMode.SCENE2D
The code in SyncManager.js seems to work for cloning the position, directions and up vectors like so:
function onPrerenderListener(syncManager, scene, time) {
var masterCamera = syncManager._viewer.scene.camera,
nSyncedViewers = syncManager._syncedViewers.length,
syncedViewers = syncManager._syncedViewers,
cesiumClone = Cartesian3.clone,
slaveViewer,
slaveCamera;
while (nSyncedViewers–) {
slaveViewer = syncedViewers[nSyncedViewers],
slaveCamera = slaveViewer.camera;
if (masterCamera == slaveCamera) {
continue;
}
cesiumClone(masterCamera.position, slaveCamera.position);
cesiumClone(masterCamera.direction, slaveCamera.direction);
cesiumClone(masterCamera.up, slaveCamera.up);
slaveCamera.lookAtTransform(masterCamera.transform); // this fixes the slaved view transform…
}
I’m assuming in the scene2D view position.x = left right, y=up down, z = in out (maybe this is a false assumption)
The slaved view seems to be cloning the z value for the x value, as the slaved view moves left/right when I zoom in/out on the masterview.
Perhaps the position in this mode is just a 2D vector, and something else controls zoom?
I have been through all the properties of Camera, and looked at ScreenSpaceCameraController.js… Nothing seems to be relevant.
Any ideas why this is happening?
Thanks in advance.