Limit camera movement on vertical axis with OrbitControls

Hi,

How would i go about limiting the vertical rotation of orbit controls to make it function more like a dome or hemisphere? (to prevent the camera from looking underneath objects)

Thanks a lot.

Try configuring OrbitControls.maxPolarAngle like in the following live example: https://jsfiddle.net/kc8j63ez/

2 Likes

That did the job! much appreciated. :smile:

thank you so much