From 67c7b15552db36f4381ad7bf52bb4bf8b9fe652e Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Tue, 29 Mar 2011 20:23:55 +0100 Subject: [PATCH] Reverting Camera.update as how it was before (as it turned out that wasn't the problem). This needs more testing. --- src/cameras/Camera.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/cameras/Camera.js b/src/cameras/Camera.js index 57c83497..52ca4ee9 100644 --- a/src/cameras/Camera.js +++ b/src/cameras/Camera.js @@ -77,19 +77,30 @@ THREE.Camera.prototype.update = function ( parentMatrixWorld, forceUpdate, camer } else { - if ( parentMatrixWorld ) { + if ( this.matrixAutoUpdate ) { - this.matrixWorld.multiply( parentMatrixWorld, this.matrix ); - - } else { - - this.matrixWorld.copy( this.matrix ); + forceUpdate |= this.updateMatrix(); } - THREE.Matrix4.makeInvert( this.matrixWorld, this.matrixWorldInverse ); + if ( forceUpdate || this.matrixWorldNeedsUpdate ) { - forceUpdate = true; + if ( parentMatrixWorld ) { + + this.matrixWorld.multiply( parentMatrixWorld, this.matrix ); + + } else { + + this.matrixWorld.copy( this.matrix ); + + } + + this.matrixWorldNeedsUpdate = false; + forceUpdate = true; + + THREE.Matrix4.makeInvert( this.matrixWorld, this.matrixWorldInverse ); + + } }