Browse Source

Merge pull request #5671 from chrmoritz/OrbitControllsAutoRotate

OrbitControls: pause autoRotate during user interaction
Mr.doob 10 years ago
parent
commit
d07f3a5381
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/controls/OrbitControls.js

+ 1 - 1
examples/js/controls/OrbitControls.js

@@ -256,7 +256,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 		phi = Math.atan2( Math.sqrt( offset.x * offset.x + offset.z * offset.z ), offset.y );
 
-		if ( this.autoRotate ) {
+		if ( this.autoRotate && state === STATE.NONE ) {
 
 			this.rotateLeft( getAutoRotationAngle() );