public override Vector2 GetScrollDelta()
        {
            var delta = Vector2.zero;

            switch (buttonEventSource)
            {
            case ButtonEventSource.AllButtons:
                delta = ViveInput.GetPadTouchDelta(HandRole.RightHand) + ViveInput.GetPadTouchDelta(HandRole.LeftHand);
                break;

            case ButtonEventSource.RightHandOnly:
                delta = ViveInput.GetPadTouchDelta(HandRole.RightHand);
                break;

            case ButtonEventSource.LeftHandOnly:
                delta = ViveInput.GetPadTouchDelta(HandRole.LeftHand);
                break;
            }
            return(delta * scrollDeltaScale);
        }
 public override bool GetPressUp()
 {
     return(ViveInput.GetPressUpEx(viveRole.roleType, viveRole.roleValue, viveButton));
 }
 public Vector2 GetCurrentValue()
 {
     return(ViveInput.GetPadTouchAxis(hand));
 }
 public override bool IsValueChangedThisFrame()
 {
     v2 = ViveInput.GetPadTouchDelta(hand);
     return(!Mathf.Approximately(v2.sqrMagnitude, 0f));
 }
 public float GetCurrentValue()
 {
     return(ViveInput.GetTriggerValue(hand));
 }
 public override bool IsValueChangedThisFrame()
 {
     xRaw = ViveInput.GetTriggerValue(hand, false) - ViveInput.GetTriggerValue(hand, true);
     return(!Mathf.Approximately(xRaw, 0f));
 }
 public override bool GetPressUp()
 {
     return(ViveInput.GetPressUp(hand, viveButton));
 }
Example #8
0
 public override Vector2 GetScrollDelta()
 {
     return(ViveInput.GetScrollDelta(m_viveRole, m_scrollType, m_scrollDeltaScale));
 }
Example #9
0
 public override Vector4 GetDelta()
 {
     return(ViveInput.GetScrollDelta(viveRole, viveEventCaster.scrollType, viveEventCaster.scrollDeltaScale));
 }
Example #10
0
 public override Vector4 GetDelta()
 {
     return(new Vector4(ViveInput.GetTriggerValueEx(viveRole.roleType, viveRole.roleValue, false) - ViveInput.GetTriggerValueEx(viveRole.roleType, viveRole.roleValue, true), 0f));
 }
 public override Vector2 GetScrollDelta()
 {
     return(ViveInput.GetPadTouchDeltaEx(m_viveRole.roleType, m_viveRole.roleValue) * scrollDeltaScale);
 }
Example #12
0
 public Vector2 GetCurrentValue()
 {
     return(ViveInput.GetPadTouchAxisEx(viveRole.roleType, viveRole.roleValue));
 }
Example #13
0
 public override bool IsValueChangedThisFrame()
 {
     v2 = ViveInput.GetPadTouchDeltaEx(viveRole.roleType, viveRole.roleValue);
     return(!Mathf.Approximately(v2.sqrMagnitude, 0f));
 }
Example #14
0
 public float GetCurrentValue()
 {
     return(ViveInput.GetTriggerValueEx(viveRole.roleType, viveRole.roleValue));
 }
Example #15
0
 public override bool IsValueChangedThisFrame()
 {
     xRaw = ViveInput.GetTriggerValueEx(viveRole.roleType, viveRole.roleValue, false) - ViveInput.GetTriggerValueEx(viveRole.roleType, viveRole.roleValue, true);
     return(!Mathf.Approximately(xRaw, 0f));
 }