14 SelectButtonUnpressed,
21 [Tooltip(
"Elapsed time for hold started gesture in seconds.")]
22 protected float HoldStartedInterval = 2.0f;
25 [Tooltip(
"Elapsed time for hold completed gesture in seconds.")]
26 protected float HoldCompletedInterval = 3.0f;
29 [Tooltip(
"The action button that is used to select. Analogous to air tap on HoloLens and trigger press with motion controllers.")]
33 [Tooltip(
"The Horizontal Axis that navigation events take place")]
36 [Tooltip(
"The Vertical Axis that navigation events take place")]
47 if (
string.IsNullOrEmpty(GamePadName))
58 HoldStartedRoutine = StartCoroutine(HandleHoldStarted(eventData));
63 HandleNavigation(eventData);
68 HandleSelectButtonReleased(eventData);
79 if (HoldStartedRoutine != null)
81 StopCoroutine(HoldStartedRoutine);
84 switch (CurrentGestureState)
97 CurrentGestureState =
GestureState.SelectButtonUnpressed;
102 yield
return new WaitForSeconds(HoldStartedInterval);
119 if (displacementAlongX == 0.0f && displacementAlongY == 0.0f && CurrentGestureState !=
GestureState.NavigationStarted) {
return; }
121 NormalizedOffset.x = displacementAlongX;
122 NormalizedOffset.y = displacementAlongY;
123 NormalizedOffset.z = 0f;
125 if (CurrentGestureState !=
GestureState.NavigationStarted)
144 [Obsolete(
"Use XboxControllerMapping.GetButton_Up")]
150 [Obsolete(
"Use XboxControllerMapping.GetButton_Pressed")]
156 [Obsolete(
"Use XboxControllerMapping.GetButton_Down")]