Parcourir la source

fix default height when set to 0

Trevor Baron il y a 7 ans
Parent
commit
5525514e3d
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  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){