浏览代码

small changes to anchor system

Raanan Weber 5 年之前
父节点
当前提交
de95a97614
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/Cameras/XR/features/WebXRAnchorSystem.ts

+ 5 - 1
src/Cameras/XR/features/WebXRAnchorSystem.ts

@@ -130,7 +130,8 @@ export class WebXRAnchorSystem implements WebXRFeature {
             if (results.length) {
                 const hitResult = results[0];
                 const transform = new XRRigidTransform(hitResult.hitMatrix);
-                this.addAnchorAtRigidTransformation(transform, hitResult.plane);
+                // find the plane on which to add.
+                this.addAnchorAtRigidTransformation(transform);
             }
         };
 
@@ -139,6 +140,9 @@ export class WebXRAnchorSystem implements WebXRFeature {
             onResults(this._hitTestModule.lastNativeXRHitResults);
         }
         WebXRHitTest.XRHitTestWithSelectEvent(event, this.xrSessionManager.referenceSpace).then(onResults);
+
+        // API will soon change, will need to use the plane
+        this._planeDetector;
     }
 
     public addAnchorAtRigidTransformation(xrRigidTransformation: XRRigidTransform, anchorCreator?: XRAnchorCreator) {