LoginSignup
5
2

More than 5 years have passed since last update.

OculusGoのコントローラーのBackはOVRInput.Button.Backでは取得できない罠

Last updated at Posted at 2018-07-01

OculusGoコントローラーについている「←」のアイコンが付いたバックボタンですが、これは OVRInput.Button.Back ではありません。(2018/07/01時点)
実はAndroidの「戻る」ボタンという扱いらしいです。Androidの戻るボタンはEscapeキーと同じ扱いなので、以下の動くコードのような書き方をしましょう。

環境: Unity 2018.1.5f1 (64-bit) / OculusUtilities(1.26.0 2018/06/20)

動かないコード

if (OVRInput.GetDown(OVRInput.Button.Back)) { /* 戻る処理 */ }

動くコード

if (Input.GetKeyDown(KeyCode.Escape)) { /* 戻る処理 */ }
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2