/// <summary> /// Adds a model whe the user taps on the plane /// </summary> private void OnTapArPlane(object sender, BaseArFragment.TapArPlaneEventArgs e) { if (modelRenderable == null) { return; } if (this.Mode == SpatialAnchorsMode.AddAnchors && this.Status == SpatialAnchorStatus.Iddle) { var model = CreateModel(new AnchorNode(e.HitResult.CreateAnchor()), null); this.anchorVisuals[string.Empty] = model; this.Status = SpatialAnchorStatus.Scanning; } }
private void OnTapArPlane(object sender, BaseArFragment.TapArPlaneEventArgs e) { if (andyRenderable == null) { return; } // Create the Anchor. Anchor anchor = e.HitResult.CreateAnchor(); AnchorNode anchorNode = new AnchorNode(anchor); anchorNode.SetParent(arFragment.ArSceneView.Scene); // Create the transformable andy and add it to the anchor. TransformableNode andy = new TransformableNode(arFragment.TransformationSystem); andy.SetParent(anchorNode); andy.Renderable = andyRenderable; andy.Select(); }