Legacy Documentation: Version 2018.2 (Go to current version)
LanguageEnglish
  • C#

GestureRecognizer.TappedEventDelegate

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public delegate void TappedEventDelegate(XR.WSA.Input.InteractionSourceKind source, int tapCount, Ray headRay);

Parameters

sourceIndicates which input medium triggered this event.
tapCountThe count of taps (1 for single tap, 2 for double tap).
headRayRay (with normalized direction) from user at the time this event interaction began.

Description

Callback indicating a tap event.

Users should register with TappedEvent. If only one of GestureSettings.Tap or GestureSettings.DoubleTap is set, then tapCount is reported as 1 or 2 respectively. If both GestureSettings.Tap and GestureSettings.DoubleTap are set, then two tapCounts are reported successively. For example, if you enable both taps on the same GestureRecognizer and tap twice, then two events are generated, the first with tapCount = 1 and the second with tapCount = 2.

Did you find this page useful? Please give it a rating: