I am implementing a model viewer in three.js with an overlay as two scenes. Objects in the main scene are controlled using TrackballControls. Objects in the overlay scene are projected using a separate camera not controlled by any of the control classes. I do this in order to allow objects in the main scene to zoom, rotate and pan and objects in the overlay scene to simulate rotation (by redrawing the objects as nothing beyond a plane parallel to the xy axis should be displayed). I render the two scenes successively like so:
this.renderer.render(this.scene, this.camera);
this.renderer.clear(false, true, false);
this.renderer.render(this.overlayScene, this.overlayCamera);
That works fine for the most part. The issue I'm having is that when I redraw the objects in the overlay scene, it gets out of sync with the rotation in the main scene. I tried using TrackballControls in the overlay scene, but that seemed to make it harder to redraw the objects. Is there a better approach than using two scenes to accomplish the same goals? If using two scenes is the best approach, how can I keep the two scenes in sync?