From e2f465d2fbf504c08f78a3653962b1caf7cd60e1 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Thu, 1 Jun 2017 16:43:01 -0700 Subject: [PATCH] Camera: Compute matrixWorldInverse automatically. --- src/cameras/Camera.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cameras/Camera.js b/src/cameras/Camera.js index a91c330788b4b1..18887b913453c9 100644 --- a/src/cameras/Camera.js +++ b/src/cameras/Camera.js @@ -53,6 +53,14 @@ Camera.prototype = Object.assign( Object.create( Object3D.prototype ), { }(), + updateMatrixWorld: function ( force ) { + + Object3D.prototype.updateMatrixWorld.call( this, force ); + + this.matrixWorldInverse.getInverse( this.matrixWorld ); + + }, + clone: function () { return new this.constructor().copy( this );