In my example I have box at 0,0,0 and camera at -30, 0, 50. How can I rotate my camera to box position? I tried camera.lookAt but after this, camera just moved at 0,0,0, not rotate.
OrbitControls.target is the zero vector by default so your suggestion has no effect.
Can you please try to clarify your question? I’m afraid “rotating to a position” does not make sense.
Besides, you are using three.js files from different releases. Meaning OrbitControls from R85 and three.min.js from R110. Please never do this. Such combinations are not supported.
I’m just learning and testing three.js, so first of all, sorry for my possibly incorrect questions.
I wanna create moving like this
At the beginning I have box and camera in front of it and then I want to move the camera so that she continues to look at the box. In this situation have I move and rotate camera, or move and rotate everything else except the camera?
Thank you very much for your help, but apparently I yesterday somewhere made some small mistake in the code, and because of this, everything did not work as intended. Now, when I changing camera.position everything works as expected codepen