Ejemplo n.º 1
0
    private void TryInput(HandInteractionController thisController, SteamVR_Behaviour_Pose thisPose)
    {
        ////premo e mollo il grip
        //if (gripAction.GetStateDown(thisPose.inputSource))
        //{
        //    thisController.HandActivated(true);
        //    return;
        //}

        //if (gripAction.GetStateUp(thisPose.inputSource))
        //{
        //    thisController.HandReleased(true);
        //    return;
        //}



        //premo e mollo il trigger
        if (pullAction.GetStateDown(thisPose.inputSource))
        {
            var isGripPressed = gripAction.GetStateDown(thisPose.inputSource);
            thisController.HandActivated(isGripPressed);
            return;
        }

        if (pullAction.GetStateUp(thisPose.inputSource))
        {
            thisController.HandReleased(false);
            return;
        }
    }