瀏覽代碼

fix default height when set to 0

Trevor Baron 7 年之前
父節點
當前提交
5525514e3d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/Cameras/VR/babylon.vrExperienceHelper.ts

+ 4 - 1
src/Cameras/VR/babylon.vrExperienceHelper.ts

@@ -167,6 +167,9 @@ module BABYLON {
             if (webVROptions.createDeviceOrientationCamera === undefined) {
             if (webVROptions.createDeviceOrientationCamera === undefined) {
                 webVROptions.createDeviceOrientationCamera = true;
                 webVROptions.createDeviceOrientationCamera = true;
             }
             }
+            if (webVROptions.defaultHeight === undefined) {
+                webVROptions.defaultHeight = 1.7;
+            }
             if (webVROptions.useCustomVRButton) {
             if (webVROptions.useCustomVRButton) {
                 this._useCustomVRButton = true;
                 this._useCustomVRButton = true;
                 if (webVROptions.customVRButton) {
                 if (webVROptions.customVRButton) {
@@ -176,7 +179,7 @@ module BABYLON {
             if (webVROptions.rayLength) {
             if (webVROptions.rayLength) {
                 this._rayLength = webVROptions.rayLength
                 this._rayLength = webVROptions.rayLength
             }
             }
-            this._defaultHeight = webVROptions.defaultHeight || 1.7;
+            this._defaultHeight = webVROptions.defaultHeight;
 
 
             // Set position
             // Set position
             if(this._scene.activeCamera){
             if(this._scene.activeCamera){