Unity HTC.UnityPlugin 插件的按键

 using HTC.UnityPlugin.Vive;


private void Start()
    {
        //事件注册
      //  ViveInput.AddClick(HandRole.RightHand, ControllerButton.Pad, OnPadClick);
    }

    void OnPadClick()
    {
        print("PadClick");
    }

    private void Update()
    {

        ////扣动扳机键
        //if (ViveInput.GetPressDown(HandRole.RightHand, ControllerButton.Trigger))
        //{
        //    print("RightHand  nice");
        //}
        //if (ViveInput.GetPressDown(HandRole.LeftHand, ControllerButton.Trigger))
        //{
        //    print("LeftHand");
        //}

        //if (ViveInput.GetPressDown(HandRole.RightHand, ControllerButton.Menu))
        //{
        //    print("Right  Menu");
        //}

        //if (ViveInput.GetPressDown(HandRole.RightHand, ControllerButton.PadTouch))
        //{
        //    print("Right  PadTouch");
        //}

    }

猜你喜欢

转载自blog.csdn.net/m0_37981386/article/details/87444126