Bladeren bron

Exiting VR can result in messed up view

Trevor Baron 7 jaren geleden
bovenliggende
commit
d8e0734d33
2 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 1 0
      dist/preview release/what's new.md
  2. 1 1
      src/Cameras/VR/babylon.vrExperienceHelper.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -155,6 +155,7 @@
 - GizmoManager should hide existing gizmos if a non-attachable mesh is selected ([TrevorDev](https://github.com/TrevorDev))
 - GizmoManager should hide existing gizmos if a non-attachable mesh is selected ([TrevorDev](https://github.com/TrevorDev))
 - Ignore isPickable = false for vr ray casting if the mesh's name matches the specified floorMeshName to maintain backwards compatability ([TrevorDev](https://github.com/TrevorDev))
 - Ignore isPickable = false for vr ray casting if the mesh's name matches the specified floorMeshName to maintain backwards compatability ([TrevorDev](https://github.com/TrevorDev))
 - Fix File Loading if hosted from `file:`-Protocol ([ltetzlaff](https://github.com/ltetzlaff))
 - Fix File Loading if hosted from `file:`-Protocol ([ltetzlaff](https://github.com/ltetzlaff))
+- Exiting VR can result in messed up view ([TrevorDev](https://github.com/TrevorDev))
 
 
 ### Core Engine
 ### Core Engine
 
 

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

@@ -777,7 +777,7 @@ module BABYLON {
                 // A VR display is connected
                 // A VR display is connected
                 this._webVRpresenting = vrDisplay.isPresenting;
                 this._webVRpresenting = vrDisplay.isPresenting;
 
 
-                if (wasPresenting && !this._webVRpresenting && this.isInVRMode)
+                if (wasPresenting && !this._webVRpresenting)
                     this.exitVR();
                     this.exitVR();
             } else {
             } else {
                 Tools.Warn('Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?');
                 Tools.Warn('Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?');