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); } } }
//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); }
//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); }
public bool GetNoloTouchUp(NoloTouchID touch) { return(GetNoloTouchUp((uint)1 << (int)touch)); }
public bool GetNoloTouchPressed(NoloTouchID touch) { return(GetNoloTouchPressed((uint)1 << (int)touch)); }
public bool GetNoloTouchUp(NoloTouchID touch) { return(GetNoloTouchUp(TouchMask.GetTouchMask(touch))); }
public bool GetNoloTouchPressed(NoloTouchID touch) { return(GetNoloTouchPressed(TouchMask.GetTouchMask(touch))); }