예제 #1
0
    public static float GetAxis(GenericVRAxis input, Handedness handedness)
    {
        if (handedness == Handedness.None)
        {
            Debug.LogError("Handedness not set");
            return(0);
        }

        return(Input.GetAxis(handedness.ToString() + input.ToString()));
    }
예제 #2
0
    public static float GetAxisOnce(GenericVRAxis axisInput, Handedness handedness, float?inputThreshold = 0.75f)
    {
        VRAxis vrAxis = (VRAxis)Enum.Parse(typeof(VRAxis), handedness.ToString() + axisInput.ToString());

        return(GetAxisOnce(vrAxis, inputThreshold));
    }