three.jspointerlock

Is there a way to limit the angle of rotation of the camera with PointerLock controls in THREE.JS?


I was wondering if there is a way to limit the polar angle so the camera doesn't go into the ground when I'm using PointerLock controls in Three.js? Similar to the minPolarAngle and maxPolarAngle for Orbit controls?


Solution

  • PointerLockControls now supports .minPolarAngle and .maxPolarAngle.

    three.js r.118 (dev version)