Forum Discussion

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

Using OVRInput without OVRManager?

I am converting a project built for the Vive to the Oculus Rift and adding in Touch support. It mostly works out the box but the button inputs are not what I want especially the B and Y button pulling up the steam overlay. I am trying to get OVRInput to run without needing OVRManager, is that possible? I know I can call OVRInput.Update() in my input checking script but the controllers aren't being detected as I am guessing OVRManager initializes the OVRPlugin and that is needed for the touch controls to be detected. Is there a way to initialize the plugin by itself?

4 Replies

Replies have been turned off for this discussion
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    I am trying to get OVRInput to run without needing OVRManager, is that possible?

    Why do you need to not use OVRManager? You don't have to use OVRCameraRig. Just add an OVRManager.cs instance to any GameObject in your scene.
  • kersk's avatar
    kersk
    Meta Employee
    The plugin is initialized internally by Unity when "Oculus" (OVRPlugin) is the active VR plugin. Double check that Oculus is present and at the top of the VR plugin list. If a Rift isn't detected, it will attempt to use the next plugin in the list. After that, manually calling OVRInput.Update() should work as expected.
  • JD3D's avatar
    JD3D
    Honored Guest
    vrdaveb said:

    > I am trying to get OVRInput to run without needing OVRManager, is that possible?

    Why do you need to not use OVRManager? You don't have to use OVRCameraRig. Just add an OVRManager.cs instance to any GameObject in your scene.



    This worked! Thanks. However, is there a way for OVRManager to load the SDK without having Virtual Reality Supported checked on in Player settings? Turning it on in runtime before instantiating the OVRManger causes the SDK not to load and thusly the controller inputs do not register. UnityEngine.VR.VRSettings.enabled = true; seems to not work. I am using Unity 5.3.4p5.
  • JD3D's avatar
    JD3D
    Honored Guest

    kersk said:

    The plugin is initialized internally by Unity when "Oculus" (OVRPlugin) is the active VR plugin. Double check that Oculus is present and at the top of the VR plugin list. If a Rift isn't detected, it will attempt to use the next plugin in the list. After that, manually calling OVRInput.Update() should work as expected.


    I am using Unity 5.3.4p5 for this so I don't believe I have access to that menu that I believe is in 5.4. But I will remember this for future projects. Thanks.