using HTC.UnityPlugin.Vive;
private void Start()
{
//事件注册
// ViveInput.AddClick(HandRole.RightHand, ControllerButton.Pad, OnPadClick);
}
void OnPadClick()
{
print("PadClick");
}
private void Update()
{
Vector2 rightPos = ViveInput.GetPadAxis(HandRole.RightHand);
扣动扳机键
//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");
//}
}
【Unity3D】HTC.UnityPlugin 插件的按键
于 2022-04-02 12:03:14 首次发布