Position camera based on OrbitControls in three.js

27 views Asked by At

I'm currently working with Three.js and using OrbitControls to manipulate my camera's position within the scene during development. My goal is to precisely determine the camera's position and then remove OrbitControls once I have the desired values.

However, I've encountered an issue. First I set my camera to the desired position using orbitControls. Then I log camera.position and camera.rotation to the console and copy the values at my desired position. I go into my code and set the default values for camera.position and camera.rotation to those values determined before. But the camera does not display the same thing, it still appears at another position.

I'm wondering if there might be another value or property I need to update to achieve the desired camera position. Can anyone help me understand why this is happening and how to resolve it?

0

There are 0 answers