十字キーでの移動
OVRPlayerController.csを直接書き換えます。
246行目あたり(ovr_unity_0.4.2_lib時点)に
OVRPlayerController.cs
// WASD
if (Input.GetKey(KeyCode.W)) moveForward = true;
if (Input.GetKey(KeyCode.A)) moveLeft = true;
if (Input.GetKey(KeyCode.S)) moveBack = true;
if (Input.GetKey(KeyCode.D)) moveRight = true;
// Arrow keys
if (Input.GetKey(KeyCode.UpArrow)) moveForward = true;
if (Input.GetKey(KeyCode.LeftArrow)) moveLeft = true;
if (Input.GetKey(KeyCode.DownArrow)) moveBack = true;
if (Input.GetKey(KeyCode.RightArrow)) moveRight = true;
以下を
OVRPlayerController.cs
// SFC Game Pad
if (Input.GetAxis ("Horizontal") < 0) {
moveLeft = true;
}
if (Input.GetAxis ("Horizontal") > 0) {
moveRight = true;
}
if (Input.GetAxis ("Vertical") < 0) {
moveBack = true;
}
if (Input.GetAxis ("Vertical") > 0) {
moveForward = true;
}
追加します。
OVRPlayControllerのプレハブをヒエラルキーにD&Dして、実行すると見た方向にBuffaloコントローラーの十字キーで動けるようになります。
Bダッシュ
//run! あたり(ovr_unity_0.4.2_lib時点)を
OVRPlayerController.cs
// if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift) || Input.GetButton("Fire2"))
のように変更します。