Skip to main content
Inspiring
February 8, 2015

OVR Player Controller issues

I am developing a game using Unity 3D and am trying to get my Oculus Rift Player controller to mount a moving platform, but the platform moves without him when mounted, leaving my OVR player behind. It works perfectly with the Unity Player controller. Does anybody have a suggestion of what I need to do to make it work with the Oculus controller?

    16 replies

    Inspiring
    July 13, 2015
    Have you tried the PlayerController that comes w/ the new Utilities package on Unity 5.1.1 native VR support?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    New Participant
    July 14, 2015
    Yes, that's what my scene was using originally, but the reason I wanted the switch was because I wanted to be able to do testing on machines that don't have/can't use the Oculus, but if the OVRcontroller doesn't detect an Oculus connected then you can't move. If I export a build then you can, but then you can't look up or down because the OVR scripts set it so you can only look side-to-side.

    Basically, I want to be able to press "play" in Unity without an Oculus attached and still move about as expected. But then I want to be able to hook up the Oculus and have that same controller work as intended under it.
    Inspiring
    July 14, 2015
    Yeah, I get what you're asking. Let me see if I can figure this out.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    New Participant
    November 14, 2017


    You should use the standard Unity first person controller, and just replace the camera with the Oculus one.



    - So import the Character Controller assets into your project.

    - Drag the First Person Controller into the scene.

    - Drag the Forward Direction and OVRCameraRig from the OVRPlayerController and put them inside the new First Person Controller.

    - Delete Main Camera from the First Person Controller.

    - Delete Graphics from Fire Person Controller.

    - Set the OVRCameraRig to position all 0 and rotation all 0.

    - Disable OVRPlayerController.



    Now moving platforms and elevators should work as normal. And you can jump!



    Only problem is that the controller no longer adjusts the movement orientation when you turn your head. I will try to find a fix for it tomorrow, it shouldn't be that hard.


    I do what you say but when I want to edit the jump input in the Character Controller Script from unity it doesn't recongize the OVR instances.
    I tried to write "
     if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad)
    {
    Jump();
    }"
    But the script doesn't recongize OVR...
    Someone knows why?! :((((
    October 17, 2018





    Only problem is that the controller no longer adjusts the movement orientation when you turn your head. I will try to find a fix for it tomorrow, it shouldn't be that hard.


    Did you Fix It , oh and are you still alive 
    Participant
    October 29, 2019
    @cybereality I've followed your steps and @paulLubos 's C# pattern in my project, now my platform animation with the player works fine, I want to navigate the player with the quest controllers, how could I do that, any other script that i have to change..? help me out devs..!>