|
@@ -138,13 +138,15 @@ export class WebXRExperienceHelper implements IDisposable {
|
|
|
// Wait until the first frame arrives before setting state to in xr
|
|
|
this.sessionManager.onXRFrameObservable.addOnce(() => {
|
|
|
this._setState(WebXRState.IN_XR);
|
|
|
+
|
|
|
+ this.setPositionOfCameraUsingContainer(new Vector3(this._nonVRCamera!.position.x, this.camera.position.y, this._nonVRCamera!.position.z));
|
|
|
});
|
|
|
|
|
|
return this.sessionManager;
|
|
|
}).catch((e: any) => {
|
|
|
console.log(e);
|
|
|
console.log(e.message);
|
|
|
- throw(e);
|
|
|
+ throw (e);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -180,4 +182,4 @@ export class WebXRExperienceHelper implements IDisposable {
|
|
|
this.onStateChangedObservable.clear();
|
|
|
this.sessionManager.dispose();
|
|
|
}
|
|
|
-}
|
|
|
+}
|