void Tap_Tapped(SpatialGestureRecognizer sender, SpatialTappedEventArgs args) { var gaze = GazeInfo.FromHeadPose(args.TryGetPointerPose(referenceFrame.CoordinateSystem)?.Head); if (args.TapCount == 1) { Application.InvokeOnMain(() => app.OnGestureTapped(gaze)); } if (args.TapCount == 2) { Application.InvokeOnMain(() => app.OnGestureDoubleTapped(gaze)); } }
public override void OnGestureTapped(GazeInfo gaze) { if (_positionIsSelected) { ThrowBall(); } if (_surfaceIsValid && !_positionIsSelected) { _positionIsSelected = true; _text3D.Text = @"El Bruno - @elbruno Now throw some balls ! AirTap to throw"; } base.OnGestureTapped(gaze); }
public override void OnGestureTapped(GazeInfo gaze) { _showGaze = !_showGaze; _cursor.CursorEnabled = _showGaze; base.OnGestureTapped(gaze); }
void Hold_HoldStarted(SpatialGestureRecognizer sender, SpatialHoldStartedEventArgs args) { var gaze = GazeInfo.FromHeadPose(args.TryGetPointerPose(referenceFrame.CoordinateSystem)?.Head); Application.InvokeOnMain(() => app.OnGestureHoldStarted(gaze)); }
public override void OnGestureTapped(GazeInfo gaze) { PositionText(); base.OnGestureTapped(gaze); }