Explorar o código

CubeCamera: Update matrixWorld if parent-less. See #6400.

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
01b77a1321
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/cameras/CubeCamera.js

+ 2 - 0
src/cameras/CubeCamera.js

@@ -47,6 +47,8 @@ THREE.CubeCamera = function ( near, far, cubeResolution ) {
 
 	this.updateCubeMap = function ( renderer, scene ) {
 
+		if ( this.parent === undefined ) this.updateMatrixWorld();
+
 		var renderTarget = this.renderTarget;
 		var generateMipmaps = renderTarget.generateMipmaps;