Pārlūkot izejas kodu

fix default height when set to 0

Trevor Baron 7 gadi atpakaļ
vecāks
revīzija
5525514e3d
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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) {
                 webVROptions.createDeviceOrientationCamera = true;
             }
+            if (webVROptions.defaultHeight === undefined) {
+                webVROptions.defaultHeight = 1.7;
+            }
             if (webVROptions.useCustomVRButton) {
                 this._useCustomVRButton = true;
                 if (webVROptions.customVRButton) {
@@ -176,7 +179,7 @@ module BABYLON {
             if (webVROptions.rayLength) {
                 this._rayLength = webVROptions.rayLength
             }
-            this._defaultHeight = webVROptions.defaultHeight || 1.7;
+            this._defaultHeight = webVROptions.defaultHeight;
 
             // Set position
             if(this._scene.activeCamera){