1
votes

I have a three.js scene and im using OrbitControls to rotate the camera around the origin position of 0,0,0

I'm trying to lock the camera to be able to rotate infinitely on on the y-axis (vertically going up or down)

You can see the scene im working on here: https://www.fariskassim.com/stage/rebel9/gyeonggicheon/carousel/v1/index.html

I've tried the following but its doesnt really rotate whole way round and its not infinite either

  controls.minAzimuthAngle = 0;
  controls.maxAzimuthAngle = 0;

There's a similar question here that locks the camera on the x-axis, but im not sure how to change it to lock on y only Lock x axis rotation when using OrbitControls - Three.js

2

2 Answers

1
votes

I will add this here for future reference as the OP seems to have got it working with:

controls.minAzimuthAngle = Math.PI;
controls.maxAzimuthAngle = Math.PI;
0
votes

use

controls.minPolarAngle=controls.maxPolarAngle=1.57079