Forum Discussion

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

Weird problems with DK1 and Unity 5

Hi,

I tried to use DK1 with Unity 5. I works nicely with Unity 4, but with U5 there are some weird problems. First problem is probably just bug in their example program or in U5 itself, but when I try the example included with U5, all UI elements are upside down and game is rotated properly. When I try to use menu with mouse, clicks are reversed: for example, if I click upper left corner of screen, the game thinks I clicked bottom right.

The other bug is about how image is rendered to Oculus. It looks like either there is 90 degrees angle between eyes or cameras are far from another. This other bug makes Oculus fully unusable with U5.

Have anyone else encountered any of these bugs, or even better, found a solution?

I have set both "Virtual Reality Supported" and "Stereoscopic Rendering" on from "Player Settings". I have also tried other combinations, and it looks like putting on "Stereoscopic Rendering" doesn't affect anything.


Sorry about that English.

4 Replies

Replies have been turned off for this discussion
  • Hello,

    I have been using Unity 5 with DK1 and although I have encountered some minor problems so far, for the most part it works just fine.

    • Are you using the latest Oculus runtime and updated to the latest patch of unity (a new patch was released today)

    • Have you tried creating an empty project with just a camera, a light and a simple object (e.g a box) and test if it is also giving you the same problems?

    • Also what settings are you using on the oculus runtime?

    I am using the DK1 on extended mode (from oculus runtime) and checked that the resolution is correct (1280x800) under screen resolution. Also the DK1 is running as an extended monitor and is set to landscape orientation.

    Finally about the Stereoscopic rendering it is recommended from Unity to leave it off.

    The problems that you are encountering most resemble what happens if the oculus runtime (configutil) is not running.

    Also I have found that if the editor fails to find the oculus runtime it won't find it again unless you uncheck and check again the "Virtual reality supported" option

    Hope this helps.

    Edit: By the way this is all relevant for the Unity editor. For a standalone build, I still have not managed to make it work properly. That is probably related to this
  • First off, you should NOT enable the "stereoscopic rendering" options. The only thing that needs to be set is the "virtual reality supported". It sounds like you may be in extended mode with incorrect settings. You should set the DK1 to 1280x800 2 60Hz. You may have better luck with direct mode. I haven't actually tried DK1 w/ Unity 5, so it is possible there is a bug. Also, does the Config Util demo scene work and do you have the latest runtime (at least 0.6.0.0)?
  • "IDZoulias" wrote:

    For a standalone build, I still have not managed to make it work properly. That is probably related to this


    I managed to get the build run as well by following @cybereality's advice on another thread.

    • To make a standalone build work with the DK1 press shift (or control or alt) after double clicking on the .exe and then set to windowed.


    So from my experience at least, unity 5.1.1, oculus runtime 0.6.0.0 and DK1 do work together both in the editor and for the standalone build.
  • Hi again, and thanks for help.

    The GUI element problem is most likely related to this:
    "http wrote:

    UI: Screen Space - Overlay not supported.

    I am using latest runtime, and I updated to latest patch of Unity. I am using correct resolution and frequency, 1280x800@60Hz.

    I created small test project with just camera, light and cube. It has same problem with "eye direction".

    Extended Desktop does not work properly, regardless of other settings.

    I can get image in direct mode with both editor and standalone application. Standalone application works with and without windowed mode (windowed mode does work nearly every time). I am unable to take screen shot in standalone, because it always shows only health warning in screen (although it cannot be seen in Rift itself. However, I took screen about application running in unity editor.

    Screen shot: http://picpaste.com/pics/sh2.1435152089.png

    There are many differences between running in Unity or as standalone application. Unity seems to work better, because with standalone application both eyes show same horizon, which breaks everything when you tilt your head.

    The "eye direction" problem:

    When I close my right eye I see box just in front of me. I have to turn my head about 90 degrees to see it with my right eye. Sometimes it is not that severe, but there is small distance between image in right and in left eye.

    Using Demo Scene feature from Configuration utility it works perfectly after I turn tracker bounds on and press recenter.