0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unityでゲームつくりてえ。:Dpad(十字キー)をなんとかしてえ。

Last updated at Posted at 2020-05-18

※書きかけの記事だよ★

ゲームパッドの十字キーの取り扱いが非常に難儀と聞き、やってみたら難儀でした。
のちのち調べて表埋めしたい。
以下まとめ。

経緯

  • ゲームパッドは厄介、Dpadは特に厄介、という話は聞いていた
  • unity1week の影響で、WebGLでビルドすることを意識しはじめた
    • Mac勢は多い、ということにいまさら気付いた
    • エディタ内テストで期待通りに操作できてたのに、WebGLにビルドすると違う動作をする!
  • ちゃんと調べて対応しないと「うごかないよお」て人が思ったより増えるのでは

環境別対応表

検証済み ビルド先 OS ゲームパッド 横軸(Horizontal) 縦軸(Vertical)
エディタ内 Win PS4 7軸 8軸
- エディタ内 Win XBox 6軸 7軸
- エディタ内 Win PC ? ?
- エディタ内 Mac PS4 8ボタン、7ボタン 5ボタン、6ボタン
- エディタ内 Mac XBox ? ?
- エディタ内 Mac PC ? ?
WebGL Win PS4 6軸 7軸

ひとりごと

  • そのゲームパッドが「なに経由で動いているか」みたいな話なのかなー(XInputとかそのへん)。
  • GamepadAPIというものがあることを知った。

参考記事

https://ch.nicovideo.jp/tenoji/blomaga/ar1646706
https://qiita.com/o_s_t/items/c18edeeee869d42c6eb9
https://developer.mozilla.org/ja/docs/Games/Techniques/Controls_Gamepad_API

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?