1. 程式人生 > >unity 5.6.1 Oculus手柄輸入問題

unity 5.6.1 Oculus手柄輸入問題

alt ima mage update class nbsp key 返回 void

unity文檔中提到 軸的 ID 是5和6,但是測試後發現,ID是6和7,很坑

技術分享

技術分享

 1 void Update () {
 2         if (Input.GetKeyDown(KeyCode.JoystickButton0)) {
 3             Debug.Log ("確定");
 4         }
 5         if (Input.GetKeyDown(KeyCode.JoystickButton1)) {
 6             Debug.Log ("返回");
 7         }
 8         Debug.Log (Input.GetAxis("
OculusRL")); 9 Debug.Log (Input.GetAxis("OculusUD")); 10 }

unity 5.6.1 Oculus手柄輸入問題