Browse Source

Merge pull request #15565 from donmccurdy/bug-spotlight-position

GLTFLoader: Reset spotlight default position.
Mr.doob 6 years ago
parent
commit
ed5d702c70
1 changed files with 4 additions and 0 deletions
  1. 4 0
      examples/js/loaders/GLTFLoader.js

+ 4 - 0
examples/js/loaders/GLTFLoader.js

@@ -365,6 +365,10 @@ THREE.GLTFLoader = ( function () {
 
 		}
 
+		// Some lights (e.g. spot) default to a position other than the origin. Reset the position
+		// here, because node-level parsing will only override position if explicitly specified.
+		lightNode.position.set( 0, 0, 0 );
+
 		lightNode.decay = 2;
 
 		if ( lightDef.intensity !== undefined ) lightNode.intensity = lightDef.intensity;