Esempio n. 1
0
        public static uint GetTouchMask(NoloTouchID touch)
        {
            if (NoloVR_System.GetInstance().trackModel == NoloVR_Manager.TrackModel.Track_6dof)
            {
                switch (touch)
                {
                case NoloTouchID.TouchPad:
                    return(1 << 0);

                case NoloTouchID.Trigger:
                    return(1 << 1);

                default:
                    return(0);
                }
            }
            else
            {
                switch (touch)
                {
                case NoloTouchID.TouchPad:
                    return(1 << 0);

                default:
                    return(0);
                }
            }
        }
Esempio n. 2
0
 //touch axis return vector2 x(-1~1)y(-1,1)
 public Vector2 GetAxis(NoloTouchID axisIndex = NoloTouchID.TouchPad)
 {
     Update();
     if ((controllerStates.touches & (1 << (int)axisIndex)) != 0)
     {
         return(new Vector2(controllerStates.touchpadAxis.x, controllerStates.touchpadAxis.y));
     }
     return(Vector2.zero);
 }
Esempio n. 3
0
 //touch axis return vector2 x(-1~1)y(-1,1)
 public Vector2 GetAxis(NoloTouchID axisIndex = NoloTouchID.TouchPad)
 {
     Update();
     if (axisIndex == NoloTouchID.TouchPad)
     {
         return(new Vector2(controllerStates.touchpadAxis.x, controllerStates.touchpadAxis.y));
     }
     if (axisIndex == NoloTouchID.Trigger)
     {
         return(new Vector2(controllerStates.rAxis1.x, controllerStates.rAxis1.y));
     }
     return(Vector2.zero);
 }
Esempio n. 4
0
 public bool GetNoloTouchUp(NoloTouchID touch)
 {
     return(GetNoloTouchUp((uint)1 << (int)touch));
 }
Esempio n. 5
0
 public bool GetNoloTouchPressed(NoloTouchID touch)
 {
     return(GetNoloTouchPressed((uint)1 << (int)touch));
 }
Esempio n. 6
0
 public bool GetNoloTouchUp(NoloTouchID touch)
 {
     return(GetNoloTouchUp(TouchMask.GetTouchMask(touch)));
 }
Esempio n. 7
0
 public bool GetNoloTouchPressed(NoloTouchID touch)
 {
     return(GetNoloTouchPressed(TouchMask.GetTouchMask(touch)));
 }