Forum Discussion
mhenrydpai
7 years agoHonored Guest
Controller Support
I was able to develop a Unity game and Build and Run it on my Oculus Go. The scene is there, a plane, 2 cubes and a sphere, however, I cannot get the player to move using my controller. I was thinking...
mhenrydpai
7 years agoHonored Guest
I do not see the Oculus folder under Assets.
This code allows me to use the arrow keys on my computer keyboard in Unity to move my player object, however, if I do a build an run to Oculus Go it does not work using the controller:
public class PlayerController : MonoBehaviour
{
public float speed;
private Rigidbody rb;
private 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
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 7 months ago