What I’m expecting to do:
Get the position of the model
Move the camera to this position on 0.5 distance.
Camera look at the position.
What I have:
I get the position of the top part of the model.
I’m moving the camera to position,
var tween = new TWEEN.Tween(camera_position).to(position, 100);
but it’s looking wrong (It’s get inside the middle part of model).
When I’m loading it inside the three js viewer and check position - it’s correct (on center of mesh)
OrbitControls always looks at the
target vector. If you want to change the point of focus, you definitely have to change this vector.
See my answer in the below link you can change the x,y and z of the camera/target and make it zoom to where you want Orbit Controls - Simple Zoom in and Zoom out
Be sure to use your original x,y,z of controls.target and camera.position coordinates when using the zoom out function to get back to the original position.
I am still working on this code as it slightly jumps at the end of the animation but I assume that is something to do with the object position and rotation… It works though for zooming