Explorar o código

fix plane removal

Chris Barth %!s(int64=4) %!d(string=hai) anos
pai
achega
7abe453cb1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/XR/features/WebXRPlaneDetector.ts

+ 1 - 1
src/XR/features/WebXRPlaneDetector.ts

@@ -160,7 +160,7 @@ export class WebXRPlaneDetector extends WebXRAbstractFeature {
             toRemove.forEach((index) => {
                 const plane = this._detectedPlanes.splice(index - idxTracker, 1)[0];
                 this.onPlaneRemovedObservable.notifyObservers(plane);
-                idxTracker--;
+                idxTracker++;
             });
             // now check for new ones
             detectedPlanes.forEach((xrPlane) => {