Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
bbowler982's avatar
bbowler982
Honored Guest
4 years ago

OVRInput.get() functions not working

I am trying to write a simple function to get a button click from OVR.Input and the .Get() and .GetDown() functions always return false. The controller works to grab objects with the triggers and the hands and fingers move accordingly in the game so I know the controller is working and getting input. I have the OVRManager script in my scene attached to the OVRCameraRig as well.

 

This code is placed inside the OVRPlayerControllers Update() function. I am not sure what I am missing.

 

OVRInput.Update();
OVRInput.FixedUpdate();

if (OVRInput.Get(OVRInput.Button.One))
{

      Debug.Log("Input Detected Button One");
      if (this.isStanding)
      {
            this.CameraHeight = 0.5f;
            this.isStanding = false;
       }
       else
       {
              this.CameraHeight = 2.0f;
              this.isStanding = true;
        }

}

1 Reply

Replies have been turned off for this discussion
  • SSARJ's avatar
    SSARJ
    Honored Guest

    I'm not sure what the OVRPlayerControllers Update() function does but I normaly put the other OVR function inside a normal update or fixed update function hence the need to call OVRInput.Update(); or OVRInput.FixedUpdate();

    in their respective loops