I am trying to dynamically change the mesh center of rotation by user click. I am using an orthographic camera and orthographic trackball controls, so what I’m doing right now is the following:
geometry.computeBoundingBox();
var center = geometry.boundingBox.getCenter();
mesh.localToWorld( center );
controls.target.set( click_point.x, click_point.y, click_point.z );
camera.lookAt( center );
This DOES set the rotation point to the clicked point, but the mesh is also moved so that the clicked point becomes the center of the display – and if I pan the camera, the rotation point again changes (presumably the controls “target” attribute has changed again). Is there a way I can dynamically change the point of rotation without giving the appearance of the mesh moving AND have it be independent of the camera panning?