Skip to main content
April 13, 2021

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;
        }

}

    This topic has been closed for replies.

    1 reply

    New Participant
    May 5, 2022

    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