newbie in threejs here.
I have a cube with different color on each face. The cube can be rotate using OrbitControl and I have 6 buttons in Dat.GUI to control the camera position. Objective is when clicking on "Animate to red", the orbitcontrol camera will move to the red face from its current position on a circular path, "Animate to blue" camera will move to the blue face and so on...
I have the "Animate to red" button somewhat working right now but I don't think my solution is right. Can someone point me to the right direction? Thanks
Here is my codesandbox link https://syckkt.csb.app/
So I've implemented a fix to your code here: https://exciting-haslett-vfbojd.csb.app/
The idea is to have a list of unit vectors representing each side, then animating the camera to that position. If the side is on the opposite side of the shape we animate to a perpendicular side first and then towards our target side after. Just check the code it's all in there.