Exemplo n.º 1
0
 public void OnSceneLoaded()
 {
     ViveInput.AddPressDown(HandRole.RightHand, triggerButton, RightDownHandler);
     ViveInput.AddPressDown(HandRole.LeftHand, triggerButton, LeftDownHandler);
     ViveInput.AddPressUp(HandRole.RightHand, triggerButton, RightUpHandler);
     ViveInput.AddPressUp(HandRole.LeftHand, triggerButton, LeftUpHandler);
 }
Exemplo n.º 2
0
    void AddListener()
    {
        //监听右手 右键
        ViveInput.AddPress(HandRole.RightHand, ControllerButton.Pad, onRightRightPress);
        ViveInput.AddPressDown(HandRole.RightHand, ControllerButton.Pad, onRightRightPressDown);
        ViveInput.AddPressUp(HandRole.RightHand, ControllerButton.Pad, onRightRightPressUp);
        //监听右手 左键持续按下
        ViveInput.AddPress(HandRole.RightHand, ControllerButton.Trigger, OnRightLeftPress);
        ViveInput.AddPressDown(HandRole.RightHand, ControllerButton.Trigger, OnRightLeftPressDown);
        ViveInput.AddPressUp(HandRole.RightHand, ControllerButton.Trigger, OnRightLeftPressUp);

        ViveInput.AddPressDown(HandRole.RightHand, ControllerButton.Grip, OnLeftRest);
    }