Raanan Weber 5 éve
szülő
commit
04da3e8244
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      src/Cameras/XR/webXRFeaturesManager.ts

+ 2 - 1
src/Cameras/XR/webXRFeaturesManager.ts

@@ -226,11 +226,12 @@ export class WebXRFeaturesManager implements IDisposable {
 
 
         if (attachIfPossible) {
         if (attachIfPossible) {
             // if session started already, request and enable
             // if session started already, request and enable
-            if (this._xrSessionManager.session && !feature.featureImplementation.attached && attachIfPossible) {
+            if (this._xrSessionManager.session && !feature.featureImplementation.attached) {
                 // enable feature
                 // enable feature
                 this.attachFeature(name);
                 this.attachFeature(name);
             }
             }
         } else {
         } else {
+            // disable auto-attach when session starts
             this._features[name].featureImplementation.disableAutoAttach = true;
             this._features[name].featureImplementation.disableAutoAttach = true;
         }
         }