How to make a camera transition to a different point

I have a basic setup of a perspective camera with orbit controls looking at a mesh. I want to perform a camera rotation around the object until the camera is looking at certain area of the mesh like in this page https://nikebyyou.nike.com/mercurialbyyou/ . Any suggestions how to do it?

Tween.js is a great library for generating smooth transitions between two or more values… Making the camera look at a given point in 3D space is easy; you just use the camera.lookAt(Vector3) method and you’re good to go. So the tricky part is how do you position the camera? Well, that depends on how close you want the camera to be to its target and from what angle you want to look at it. When you have an idea, you simply calculate the direction vector and that’s it, now you just tell Tween.js to transition the camera from its current position to where you want it to be.

4 Likes

Thank you @TheHappyKoala, your answer guided me in the right direction.

1 Like

In the

you will find some things about it:

https://hofk.de/main/discourse.threejs/2018/TweenCubesRotation/TweenCubesRotation.html
https://hofk.de/main/discourse.threejs/2019/CameraMovement/CameraMovement.html
https://hofk.de/main/discourse.threejs/2019/TweenPause/TweenPause.html
https://hofk.de/main/discourse.threejs/2019/TweenMoveObject/TweenMoveObject.html

on eXtended eXamples
see https://codepen.io/nik-lever/pen/PrEvKb


UPDATE:
I was overlooking the example of prisoner849 (next article) very far down there:
https://hofk.de/main/discourse.threejs/2019/index2019.html
Sorry! :worried:

2 Likes

Also, take a look at this topic: [SOLVED] Tweening the rotation of a camera

1 Like