バーチャルキャスト公式Wiki
メニュー
Steam版
デバイス
アセット
配信
その他
リリース情報
- wiki編集者用ページ
-
以前のリビジョンの文書です
VCIでキーボードの入力を受け取ります。
キー名称 | キーバインド(デフォルト) | スクリプト | 取得可能な値 |
X+ | カーソルキー 右 | vci.me.GetAxisInput().x | -1,0,1 |
X- | カーソルキー 左 | vci.me.GetAxisInput().x | -1,0,1 |
Y+ | Uキー | vci.me.GetAxisInput().y | -1,0,1 |
Y- | Iキー | vci.me.GetAxisInput().y | -1,0,1 |
Z+ | カーソルキー上 | vci.me.GetAxisInput().z | -1,0,1 |
Z- | カーソルキー下 | vci.me.GetAxisInput().z | -1,0,1 |
Button1 | 数値キーの1 | vci.me.GetButtonInput(1) | true,false |
Button2 | 数値キーの2 | vci.me.GetButtonInput(2) | true,false |
Button3 | 数値キーの3 | vci.me.GetButtonInput(3) | true,false |
Button4 | 数値キーの4 | vci.me.GetButtonInput(4) | true,false |
function update() -- 軸入力を取得する。 local axis = vci.me.GetAxisInput() if axis.x ~= 0 then print(" X : "..tostring(axis.x)) end if axis.y ~= 0 then print(" Y : "..tostring(axis.y)) end if axis.z ~= 0 then print(" Z : "..tostring(axis.z)) end if vci.me.GetButtonInput(1) then print(" Button1 が押されました。") end if vci.me.GetButtonInput(2) then print(" Button2 が押されました。") end if vci.me.GetButtonInput(3) then print(" Button3 が押されました。") end if vci.me.GetButtonInput(4) then print(" Button4 が押されました。") end end
各キーが押された結果をコンソールに表示するサンプルです。