Beispiel #1
0
        private void HandlerPick(UIPinchGestureRecognizer sender)
        {
            ARSCNView pinchScene = sender.View as ARSCNView;

            CoreGraphics.CGPoint pinchLocation = sender.LocationInView(pinchScene);
            SCNHitTestResult[]   hitTest       = pinchScene.HitTest(pinchLocation, new SCNHitTestOptions());

            if (hitTest?.Any() != true)
            {
                return;
            }

            SCNNode   node        = hitTest.First().Node;
            SCNAction pinchAction = SCNAction.ScaleBy(sender.Scale, 0);

            node.RunAction(pinchAction);
            sender.Scale = 1.0f;
        }