void Update () {
if ( OVRInput.GetDown(OVRInput.RawButton.DpadDown) )
{ Debug.Log("OVRInput.RawButton.DpadDown:手柄方向键↓ "); }
if ( OVRInput.GetDown(OVRInput.RawButton.DpadLeft) )
{ Debug.Log("OVRInput.RawButton.DpadLeft:手柄方向键←"); }
if ( OVRInput.GetDown(OVRInput.RawButton.DpadRight) )
{ Debug.Log("OVRInput.RawButton.DpadRight→"); }
if ( OVRInput.GetDown(OVRInput.RawButton.DpadUp) )
{ Debug.Log("OVRInput.RawButton.DpadUp:手柄方向键↑"); }
//手柄前方上面的键位
if ( OVRInput.GetDown(OVRInput.RawButton.LShoulder) )
{ Debug.Log("OVRInput.RawButton.LShoulder"); }
if ( OVRInput.GetDown(OVRInput.RawButton.RShoulder) )
{ Debug.Log("OVRInput.RawButton.RShoulder"); }
//手柄中间的 左边为back 右边为start
if ( OVRInput.GetDown(OVRInput.RawButton.Start) )
{
Debug.Log("开始");
}
if ( OVRInput.GetDown(OVRInput.RawButton.Back) )
{
Debug.Log("返回");
}
}
Unity Oculus Rift手柄交互
最新推荐文章于 2022-10-17 17:27:49 发布