0

I am using three.js to create a tube geometry and have a feature where the camera rotates to particular angle with the click of a radio button. To rotate the camera, I tried using below code:

camera.rotation.set(2.88, -0.9, -2.0);
camera.position.set(-1800, 0, -1200);

It doesn't have any effect. but when i use the same code by first setting auto rotation update to false, it works

camera.rotationAutoUpdate = false;
camera.rotation.set(2.88, -0.9, -2.0);
camera.position.set(-1800, 0, -1200);

The issue with setting rotationAutoUpdate to false is that once the rotation is set, if i try to rotate the tube with mouse event, it messes up the whole rotation functionality. And if i try to set it to true again, the above required rotation effect is not visible.

Please suggest, if I am doing something wrong or if i am missing out something? Thanks

4

0 回答 0