Ejemplo n.º 1
0
 public bool OnTriggerUp(String hand)
 {
     if (hand == "l")
     {
         return(LeftHandDevice == null
             ? false
             : !LeftHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out bool val) && prevLeftTrigger);
     }
     else
     {
         return(RightHandDevice == null
             ? false
             : !RightHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out bool val) && prevRightTrigger);
     }
 }
Ejemplo n.º 2
0
 public Vector3 GetVelocity(String hand)
 {
     if (hand == "l")
     {
         Vector3 vel;
         LeftHandDevice.TryGetFeatureValue(CommonUsages.deviceVelocity, out vel);
         return(vel);
     }
     else
     {
         Vector3 vel;
         RightHandDevice.TryGetFeatureValue(CommonUsages.deviceVelocity, out vel);
         return(vel);
     }
 }
Ejemplo n.º 3
0
 public bool IsTriggerDown(String hand)
 {
     if (hand == "l")
     {
         return(LeftHandDevice == null
             ? false
             : LeftHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out bool val) && val);
     }
     else
     {
         return(RightHandDevice == null
             ? false
             : RightHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out bool val) && val);
         // THE ABOVE CODE WORKS!
     }
 }
Ejemplo n.º 4
0
 //if left hand joystick is pressed then this send a true bool
 public bool MenuSkip()
 {
     LeftHandDevice.TryGetFeatureValue(CommonUsages.primary2DAxisClick, out bool val);
     return(val);
 }