この文書の現在のバージョンと選択したバージョンの差分を表示します。
次のリビジョン | 前のリビジョン | ||
wiki:ue4:input:001 [2015/04/22 04:19] 127.0.0.1 外部編集 |
wiki:ue4:input:001 [2015/12/05 11:50] (現在) step |
||
---|---|---|---|
ライン 1: | ライン 1: | ||
====== キーの割り当てについて(4.7.5) ====== | ====== キーの割り当てについて(4.7.5) ====== | ||
- | ===== エディターから割り当てる ===== | + | 記事は[[http://enjoy2unreal.blogspot.jp/2015/12/blog-post.html]] に移動しました。 |
- | UE4エディターの「編集」→「プロジェクト設定」→「入力」からActionとAxisキー割り当てが可能です。 | + | |
- | + | ||
- | {{:wiki:ue4:input:ue4_key_bind.png?300|}} | + | |
- | + | ||
- | \\ | + | |
- | ===== プログラムで割り当てる ===== | + | |
- | C++からも設定は出来ます。 | + | |
- | <sxh cpp;> | + | |
- | UPlayerInput::AddEngineDefinedActionMapping(FInputActionKeyMapping("Scale", EKeys::SpaceBar)); | + | |
- | UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("MoveX", EKeys::W, 1.0f)); | + | |
- | UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("MoveX", EKeys::S, -1.0f)); | + | |
- | UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("MoveY", EKeys::A, -1.0f)); | + | |
- | UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("MoveY", EKeys::D, 1.0f)); | + | |
- | </sxh> | + | |
- | どちらも同じ処理になっています。 | + | |