Answer the question
In order to leave comments, you need to log in
How to limit camera rotation of TrackballControls in three.js?
I use this code to limit camera rotation
var controls = new THREE.TrackballControls (camera, renderer.domElement);
controls.maxAzimuthAngle = 0;
controls.minAzimuthAngle = 0;
controls.maxPolarAngle = 1.5708;
controls.minPolarAngle = 1.5708;
controls.enabled = false ;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question