Browse Source

Merge pull request #8008 from RaananW/whyAreWeAutoClearing

Why are we not auto clearing in XR
David Catuhe 5 năm trước cách đây
mục cha
commit
c73414b8a7
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 0
      dist/preview release/what's new.md
  2. 2 3
      src/XR/webXRExperienceHelper.ts

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

@@ -82,6 +82,7 @@
 - Teleportation plugin doesn't use the touched to finish teleportation ([#7916](https://github.com/BabylonJS/Babylon.js/issues/7916)) ([RaananW](https://github.com/RaananW))
 - Support for pointer selection and teleportation in right handed systems ([#7967](https://github.com/BabylonJS/Babylon.js/issues/7967)) ([RaananW](https://github.com/RaananW))
 - Pointer Selection feature now uses `selectstart` and `selectend` events when gamepad and motion controller are not present ([#7989](https://github.com/BabylonJS/Babylon.js/issues/7989)) ([RaananW](https://github.com/RaananW))
+- Removed forced `autoClear` = false settings ([RaananW](https://github.com/RaananW))
 
 ### Collisions
 

+ 2 - 3
src/XR/webXRExperienceHelper.ts

@@ -124,14 +124,13 @@ export class WebXRExperienceHelper implements IDisposable {
             this._originalSceneAutoClear = this.scene.autoClear;
             this._nonVRCamera = this.scene.activeCamera;
 
-            // Overwrite current scene settings
-            this.scene.autoClear = false;
-
             this.scene.activeCamera = this.camera;
             // do not compensate when AR session is used
             if (sessionMode !== 'immersive-ar') {
                 this._nonXRToXRCamera();
             } else {
+                // Kept here, TODO - check if needed
+                this.scene.autoClear = false;
                 this.camera.compensateOnFirstFrame = false;
             }