瀏覽代碼

WebVRManager: Fixed Mirror rendering.

Mr.doob 8 年之前
父節點
當前提交
9e5a589bd8
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/renderers/webvr/WebVRManager.js

+ 5 - 0
src/renderers/webvr/WebVRManager.js

@@ -152,6 +152,11 @@ function WebVRManager( renderer ) {
 
 		}
 
+		// envMap and Mirror needs camera.matrixWorld
+
+		cameraL.matrixWorld.getInverse( cameraL.matrixWorldInverse );
+		cameraR.matrixWorld.getInverse( cameraR.matrixWorldInverse );
+
 		cameraL.projectionMatrix.fromArray( frameData.leftProjectionMatrix );
 		cameraR.projectionMatrix.fromArray( frameData.rightProjectionMatrix );