|
@@ -111,13 +111,6 @@ export class WebXRCamera extends FreeCamera {
|
|
return "WebXRCamera";
|
|
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 _rotate180 = new Quaternion(0, 1, 0, 0);
|
|
|
|
|
|
private _updateFromXRSession() {
|
|
private _updateFromXRSession() {
|
|
@@ -153,15 +146,6 @@ export class WebXRCamera extends FreeCamera {
|
|
// update position and rotation as reference
|
|
// update position and rotation as reference
|
|
this.rotationQuaternion.copyFrom(this._referenceQuaternion);
|
|
this.rotationQuaternion.copyFrom(this._referenceQuaternion);
|
|
this.position.copyFrom(this._referencedPosition);
|
|
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();
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|