I'm facing an issue with rotating an object on the scene using THREE.TrackballControls. The rotation is not relative to the object's axis when it's not in the center of the screen - instead, it rotates based on the center of the screen. I attempted changing the camera position before creating controls but without success.
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);
camera.position.z = 3;
camera.position.y = 10;
controls = new THREE.TrackballControls(camera);
Is there a way to set the center for camera rotation in TrackballControls? This would allow the object to rotate independently of the center of the scene.
Thanks, Zhenya