瀏覽代碼

Update vrExperienceHelper.ts

Make sure button is visible after exiting fullscreen mode
Raanan Weber 5 年之前
父節點
當前提交
4a00dace10
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Cameras/VR/vrExperienceHelper.ts

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

@@ -916,6 +916,8 @@ export class VRExperienceHelper {
             if (!this._useCustomVRButton && this._btnVR) {
                 this._btnVR.style.top = this._canvas.offsetTop + this._canvas.offsetHeight - 70 + "px";
                 this._btnVR.style.left = this._canvas.offsetLeft + this._canvas.offsetWidth - 100 + "px";
+                // make sure the button is visible after setting its position
+                this.updateButtonVisibility();
             }
         }
     }