After working with threejs for quite some time on a 3D image-based modeling application at vmtklab.orobix.com, I have encountered an issue. I am currently using TrackballControls.js for camera rotation, translation, and zooming.
controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.dynamicDampingFactor = 0.5;
controls.target.set( pos.x, pos.y, pos.z );
Having previous experience with camera movement in vtk (such as Paraview), I am struggling to replicate the behavior in threejs.
Take a look at: http://jsfiddle.net/ugxbktLt/5/
The issue arises when clicking on a point off the canvas center, causing the camera to rotate in two directions instead of following the mouse movement along a single axis.
I anticipated the camera would rotate based solely on the vector between the starting point (mousedown) and end point from mouse movement, not considering the initial position. It feels like it is rotating around a sphere instead.
Any suggestions or recommendations would be greatly appreciated. Warm regards, Simone