Rotating Camera Around Self, limiting rotation angle in ThreeJS

373 Views Asked by At

I am using Three.JS to create a scene.

I want to be able to set my camera in the corner of a room and have the viewer rotate the camera around on the spot, without moving the camera's position.

Also, I want to limit the span of rotation (so that they cannot rotate the camera to look behind them).

I found FirstPersonControls, but I want the user to have to click and drag to rotate the view.

I know of the minecraft example, but it doesn't do the click and drag or angle restriction. Does anyone know of any other existing examples that accomplish something similar? Thanks.

0

There are 0 best solutions below