Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

OVRInput.Get(OVRInput.Button.One) not ever returning true

jMWhitejMWhite Posts: 1
NerveGear
The button presses in my code aren't being recognised on any of the devices despite having the OVRManager script on my OVR camara rig, and the grabber and grabbable scripts working fine on the objects I've created. Here's a stripped down class that has OVRInput.Get(OVRInput.Button.One) never return true. Pressing Keypad8 does have the desired effect.

public class Football : MonoBehaviour {

    private Rigidbody rb;
    public float Force = 1600;

    void Start () {
        rb = GetComponent<Rigidbody>();
    }    

    void FixedUpdate () {

        OVRInput.FixedUpdate();

        if (OVRInput.Get(OVRInput.Button.One))
        {
            rb.AddForce(Force * Time.deltaTime, 0, 0);
        }

        if (Input.GetKey(KeyCode.Keypad8)) {
            rb.AddForce (Force*Time.deltaTime,0,0);
        }
    }
}
Tagged:

Comments

Sign In or Register to comment.