Browse Source

fix plane removal

Chris Barth 4 năm trước cách đây
mục cha
commit
7abe453cb1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) => {