Sfoglia il codice sorgente

allow attached camera input when exiting vr

Trevor Baron 6 anni fa
parent
commit
cde7cd39f1
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      src/Cameras/VR/vrExperienceHelper.ts

+ 6 - 0
src/Cameras/VR/vrExperienceHelper.ts

@@ -1114,6 +1114,12 @@ export class VRExperienceHelper {
             });
 
             this._hasEnteredVR = false;
+
+            // Update engine state to re enable non-vr camera input
+            var engine = this._scene.getEngine();
+            if(engine._onVrDisplayPresentChange){
+                engine._onVrDisplayPresentChange();
+            }
         }
     }