Pārlūkot izejas kodu

Babylon calculates the view matrix

Raanan Weber 5 gadi atpakaļ
vecāks
revīzija
bae364bf2e
1 mainītis faili ar 0 papildinājumiem un 16 dzēšanām
  1. 0 16
      src/XR/webXRCamera.ts

+ 0 - 16
src/XR/webXRCamera.ts

@@ -111,13 +111,6 @@ export class WebXRCamera extends FreeCamera {
         return "WebXRCamera";
     }
 
-    /**
-     * Overriding the _getViewMatrix function, as it is computed by WebXR
-     */
-    public _getViewMatrix(): Matrix {
-        return this._computedViewMatrix;
-    }
-
     private _rotate180 = new Quaternion(0, 1, 0, 0);
 
     private _updateFromXRSession() {
@@ -153,15 +146,6 @@ export class WebXRCamera extends FreeCamera {
                 // update position and rotation as reference
                 this.rotationQuaternion.copyFrom(this._referenceQuaternion);
                 this.position.copyFrom(this._referencedPosition);
-                if (pose.transform.inverse) {
-                    Matrix.FromFloat32ArrayToRefScaled(pose.transform.inverse.matrix, 0, 1, this._computedViewMatrix);
-                } else {
-                    Matrix.FromFloat32ArrayToRefScaled(pose.transform.matrix, 0, 1, this._computedViewMatrix);
-                    this._computedViewMatrix.invert();
-                }
-                if (!this._scene.useRightHandedSystem) {
-                    this._computedViewMatrix.toggleModelMatrixHandInPlace();
-                }
             }
         }