I am new to Unity / Oculus Go. I followed the Unity tutorial for the roll a ball game which works on the computer. I add the OVRCameraRig and install it to the Oculus Go and can see the game but cannot move using the touchpad.
https://unity3d.com/learn/tutorials/s/roll-ball-tutorial
I know for the tutorial it says regular InputManager and the below code should work for VR. InputManager detects movement in the X and Y axis from keys or joysticks, but the Oculus Go doesn't have a joystick - so maybe InputManager doesn't support Go?
I know there is an OVRInput in Oculus Utilities but can't figure out how to make it move the player object. Any advice or articles I can refer to?
using UnityEngine; using System.Collections;
public class PlayerController : MonoBehaviour {
public float speed;
private Rigidbody rb;
void Start ()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rb.AddForce (movement * speed);
}
}
Thanks!