2
0
Эх сурвалжийг харах

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

Mr.doob 10 жил өмнө
parent
commit
01b77a1321

+ 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;