Browse Source

Merge pull request #15200 from WestLangley/dev-dir_light_helper

DirectionalLightHelper: correctly orient helper to face light target
Mr.doob 6 years ago
parent
commit
e8f0450eac
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/helpers/DirectionalLightHelper.js

+ 2 - 2
src/helpers/DirectionalLightHelper.js

@@ -73,7 +73,7 @@ DirectionalLightHelper.prototype.update = function () {
 		v2.setFromMatrixPosition( this.light.target.matrixWorld );
 		v2.setFromMatrixPosition( this.light.target.matrixWorld );
 		v3.subVectors( v2, v1 );
 		v3.subVectors( v2, v1 );
 
 
-		this.lightPlane.lookAt( v3 );
+		this.lightPlane.lookAt( v2 );
 
 
 		if ( this.color !== undefined ) {
 		if ( this.color !== undefined ) {
 
 
@@ -87,7 +87,7 @@ DirectionalLightHelper.prototype.update = function () {
 
 
 		}
 		}
 
 
-		this.targetLine.lookAt( v3 );
+		this.targetLine.lookAt( v2 );
 		this.targetLine.scale.z = v3.length();
 		this.targetLine.scale.z = v3.length();
 
 
 	};
 	};