I'm working on a website that allows users to see the objects in the sky with VRControls and look into their favorite one with Trackball controls, which is initialized by a click on the object. Here's the demo. https://jsfiddle.net/tushuhei/4f1Lum5n/6/
function focus (obj, target) {
var dummyCamera = camera.clone();
controls = new THREE.TrackballControls(dummyCamera);
controls.target.set(obj.point.x, obj.point.y, obj.point.z);
new TWEEN.Tween(camera.position)
.to(target, 1000)
.onComplete(function() {
transitioning = false;
controls.dispose();
controls = new THREE.TrackballControls(camera);
controls.target.set(obj.point.x, obj.point.y, obj.point.z);
}).start();
}
TWEEN works great to make the transitions from WebVR to Trackball mode and vice versa, but there is still a little gap at the end of the transition. I guess this comes from the gap of the camera rotation on the transition completion phase.
Is the any way to make the transition between two different camera controls smooth considering both of camera position and rotation?
Thank you,