Explorar o código

when the trnasformcontrol binded to the orthographicCamera, the eye direction is also the subtraction of
camera position and object world position;

hughhwang %!s(int64=6) %!d(string=hai) anos
pai
achega
d8608df953
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/js/controls/TransformControls.js

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

@@ -216,7 +216,7 @@ THREE.TransformControls = function ( camera, domElement ) {
 
 		} else if ( this.camera instanceof THREE.OrthographicCamera ) {
 
-			eye.copy( cameraPosition ).normalize();
+			eye.copy( cameraPosition ).sub( worldPosition ).normalize();
 
 		}