Search Unity

Using 4.6+ Unity GUI in VR (Screenspace, not worldspace)

Discussion in 'AR/VR (XR) Discussion' started by garat, Feb 16, 2015.

  1. garat

    garat

    Joined:
    Feb 16, 2015
    Posts:
    3
    I've done some pretty extensive searching, over the weekend, and last week, and was even talking to an old coworker about using the new GUI system with VR. And at least a few places say because of how it's rendered, you can't really build a UI.. Buddy suggested attaching a child like a textured quad to the camera and have it always render on top of the world, but that seems.. really kludgey, and effectively doing the exact same thing, just in a non-ideal way.

    This seems.. odd. All the debug tools render UIs, and it seems to me that screenspace should allow you to build a UI properly, and have it render to the left, center and right cameras properly. But unless I use worldspace, I simply cant' get the UI to show up.

    I'm certain I'm missing something obvious, but after about 8 hours total, I'm making a cry for help, because I'm baffled.

    Any help would of course be greatly appreciated. Even just a pointer to "Here's how you get screenspace UI to show up in the OVRCameraRig".. I can take it from there, but I can't think of anything else to try to get it to show up in the first place.
     
  2. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    659
    Heya,
    I've been working with head tracking displays for along time and done a tone of research in this area.

    You should not be using screenspace UI. It will make your players uncomfortable and increase the likelihood of nausea.

    There are a ton of reasons for this mostly having to do with physiology of humans. In general don't head lock anything and ensure that even things that follow the movement of the head have a slight lag. I understand this breaks gaming conventions (alot of things in VR will..e.g. no camera shake)

    Use world locked UI and bind it to the camera but with a springy follow. Keep it at least .6 meters away from the camera. .75 to 1 meter is even better for comfort.

    Players will thank you.
     
  3. garat

    garat

    Joined:
    Feb 16, 2015
    Posts:
    3
    Ah, that makes sense. My friend tried to explain that, but for some reason, the way he was wording it, it didn't click.

    But, I understand the reasoning. And with that in mind, I can make the worldspace UI work. It just changes how I handle updates and such.

    Thankfully, this is more of a demo, rather than a game, so the UI is very minimal, but.. still need an intro/outro scene. :)
     
  4. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    659
    Happy it helped. Good luck.
     
  5. El Maxo

    El Maxo

    Joined:
    May 23, 2013
    Posts:
    177
    just trying to help, although its not quite what you asked. Just from a design point of view, if possible its good to try and place these gui elements "inside" the game world. This is after a lot of research that I have tryed. For example instead of having a health bar at the top, maybe attach it to the characters watch. Although with VR nothing is set in stone on what works well and what doesn't.