Skip to main content
Up and Coming
June 29, 2017

OVRInput.GetDown not working on Touch controllers in unity?

I am having a hard time getting the buttons to work reliably on the oculus touch controllers in unity.

If I use if OVRInput.GetDown it never seems to work, but using OVRInput.Get works all the time?

I wasn't sure if it was something to do with OVRInput.Update (); and I've tried adding it to 1 script and all the scripts that detect input but both ways give the same results, .GetDown will not work, but .Get will?

Is there a step I'm missing?
    This topic has been closed for replies.

    24 replies

    New Participant
    June 16, 2020
    Still happening in 2019.3.15f1 
    I made my own function for this and it seems to be working with both the button press of the Start button and the hand tracking version (left hand palm index to thumb) and Got this to work:


        public OVRInput.Button pauseButton = OVRInput.Button.Start;
       
        public GameObject pauseEffect;

        public bool GameIsPaused = false;

        private bool pressedLastFrame = false;
        private bool pressedThisFrame = false;
        
        void Update()
        {
            // call these two if you want OVR controller Input
            OVRInput.Update();
            OVRInput.FixedUpdate();

            //pressedThisFrame will only be triggered like GetButtonDown, and pressedLastFrame will remain true until you stop pressing the specified button.
            pressedThisFrame = OVRInput.Get(pauseButton) && !pressedLastFrame;
            
            if (pressedThisFrame)
            {
                if (!GameIsPaused)
                {
                    Pause();
                }
                else if (GameIsPaused)
                {
                    Resume();
                }
            }

            pressedLastFrame = OVRInput.Get(pauseButton);
            pauseEffect.SetActive(GameIsPaused);
        }

    Hope this helps!
    New Participant
    August 21, 2020
    This is still happening in 2020... What is taking so long to fix???
    kavanavak
    Inspiring
    September 10, 2020
    unity 2020.1.5 + latest everything else on Quest, same issue
    New Participant
    October 13, 2020
    I was having this issue too, for me the issue was that I was calling OVRInput.Update and OVRInput.FixedUpdate in one of my own scripts, but these are already called by OVRManager.  The documentation implies you need to include OVRManager and call those functions, but I think they mean to do either/or.
    December 21, 2022

    Thank you buddy !!

    i delete OVRInput.Update() and OVRInput.FixedUpdate() in my script, and now it's work fine !!

    it would seem that, contrary to what the documentation recommends..., if OVRManager is in the scene there is no need to call the Updates/FixedUpdate méthods..

    New Participant
    October 27, 2020
    Same issue on my end in all of the following four cases: Unity 2019.4.11+
    1. Legacy Unity XR SDK + Oculus Rift link (run in editor)
    2. Legacy Unity XR SDK + Oculus Quest (apk)
    3. New Unity XR SDK + Oculus Rift link (run in editor)
    4. New Unity XR SDK+ Oculus Quest (apk)
    Participant
    October 27, 2020

    DavidW-MR said:

    I was having this issue too, for me the issue was that I was calling OVRInput.Update and OVRInput.FixedUpdate in one of my own scripts, but these are already called by OVRManager.  The documentation implies you need to include OVRManager and call those functions, but I think they mean to do either/or.


    Thank you VERY much, Sir, This one fixed it for me.

    Was I doing it wrong since ever?... Documentation clearly says:

    • Include an instance of OVRManger anywhere in your scene.
    • Call OVRInput.Update() and OVRInput.FixedUpdate() once per frame at the beginning of any component’s Update and FixedUpdate methods, respectively.
    So I was doing both "requirements"... placing OVRManager in the Scene AND calling both Update and FixedUpdate from a script I made. GetDown wasn't working, and as soon as I removed both calls from my script, it started working.

    (Quest 1, Unity 2019.3.15)
    New Participant
    October 27, 2020

    DavidW-MR said:

    I was having this issue too, for me the issue was that I was calling OVRInput.Update and OVRInput.FixedUpdate in one of my own scripts, but these are already called by OVRManager.  The documentation implies you need to include OVRManager and call those functions, but I think they mean to do either/or.



    eovento said:


    DavidW-MR said:

    I was having this issue too, for me the issue was that I was calling OVRInput.Update and OVRInput.FixedUpdate in one of my own scripts, but these are already called by OVRManager.  The documentation implies you need to include OVRManager and call those functions, but I think they mean to do either/or.


    Thank you VERY much, Sir, This one fixed it for me.

    Was I doing it wrong since ever?... Documentation clearly says:

    • Include an instance of OVRManger anywhere in your scene.
    • Call OVRInput.Update() and OVRInput.FixedUpdate() once per frame at the beginning of any component’s Update and FixedUpdate methods, respectively.
    So I was doing both "requirements"... placing OVRManager in the Scene AND calling both Update and FixedUpdate from a script I made. GetDown wasn't working, and as soon as I removed both calls from my script, it started working.

    (Quest 1, Unity 2019.3.15)


    You two are right and thanks a lot! This issue was solve on my end by removing the Update() calls. For future people who have the same issue, I'm not using FixedUpdate(), but try to remove that too and check if that'll work.
    New Participant
    January 14, 2021
    Thank you very much. I spent a lot of time trying to figure out what's wrong it turnet out I have an OVRInput.Update() call in one of my scripts. I removed it and everything started to work like a charm :smile:

    New Participant
    April 10, 2021

    Oh God thank you ! That solves the problem !

    First time ever I regret I read the documentation...

    New Participant
    September 21, 2022

    having this problem in unity 2021 and the latest oculus integration v43 , I lost a lot of time

    solution

    NEVER call OVRInput.Update() or fixedUpdate; -> or not works (also if called in any place in project) - documentation is Wrong