/ Forums
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

OVR Player Controller - Not working

JaggerWolfJaggerWolf Posts: 118
Hiro Protagonist
edited January 2015 in Unity
So I have made a few scenes just to mess around with over the past weeks - Everything worked fine, I was able to test play the scenes and they would pop right up on the headset - I could build them and play them just fine as well. I updated my Unity to the newest build <Free Version> and now the Oculus Player controller doesn't seem to work.

When I drop it in a scene and hit play it no longer comes through the headset...but if I move the headset around the head tracking shows the movements on screen. I also and unable to move around <forward, backward, etc.> in the scene...I have tried an xbox controller, and keyboard and nothing happens.

I double checked to make sure there were no other camera sources, and re-imported the oculus integration package and still nothing.

Any ideas?

Comments

  • cyberealitycybereality Posts: 19,614 Oculus Staff
    Maybe there was left over from the old integration.

    Can you create a new project and import the latest integration files. First see if it works, then you can start bringing stuff over from your project. Or if you project is already big, you can try to delete anything OVR related and then reimport.
  • I also have the problem that the keyboard input is not working with OVRPlayerController. This is a fresh project in Unity 4.6.1 (free) and Oculus SDK 0.4.4. I didn't have any previous Oculus Unity plugins.

    Mouse works. Head tracking works.
  • It may sound simple, but it is probably worth looking at the OVRPlayerController prefab and verifying that the scripts are still there and enabled (OVRGamepadController and OVRPlayerController). If mouse and HMD are working then I assume they probably are.

    Then I would check under Edit/Project Settings/Input to make sure Horizontal/Vertical axes are still mapped..

    Wouldn't hurt to bring in a regular character controller from standard assets and verify that it is working too. Try to narrow down whether it is project or OVR related.
  • Thanks for the fast reply.

    Both scripts are still in and enabled (OVRGamepad Contoller, OVRPlayerController).

    In Project Settings - Input there are also entries for Horizontal and Vertical, also with "Alt Negative Button" and "Alt Positive Button" which are the WASD keys.

    I disabled OVRPlayerController and put in First Person Controller prefab. Then the keys work again.
  • That workaround worked:
    * Remove / Gray out OVRPlayerController
    * Add First Person Controller
    * Add manual OVRCameraRig
    * Move OVRCameraRig into the First Person Controller
    * Set CameraRig rotation to 0

    Edit: But then the player walks not into the direction where he looks according to head tracking...
  • moltonmolton Posts: 388
    DanSchmitt wrote:
    Edit: But then the player walks not into the direction where he looks according to head tracking...
    The OVRPlayerController script contained code that would rotate the player with the view if the HmdRotatesY value is true.
    Quaternion ort = (HmdRotatesY) ? CameraController.centerEyeAnchor.rotation : transform.rotation;
    Vector3 ortEuler = ort.eulerAngles;
    ortEuler.z = ortEuler.x = 0f;
    ort = Quaternion.Euler(ortEuler);
    

    I'm not sure I ever saw a line like "ortEuler.z = ortEuler.x = 0f;" with 2 equals signs like that, is that a quick way to assign both values to 0f or is something else going on there?
Sign In or Register to comment.