Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

WebVR + DK2 rendering very incorrect views in each eye

Discussion in 'WebGL' started by AnthonyPalma, Mar 13, 2016.

  1. AnthonyPalma

    AnthonyPalma

    Joined:
    Aug 11, 2013
    Posts:
    128
    Hello! I posted this in the VR section too, sorry for the double post - wasn't sure where it was more appropriate.

    Anyway, I'm working on a WebVR demo, and I used this code to get a Unity WebGL build working with VR (DK2) in Firefox Nightly (WebVR): https://github.com/gtk2k/Unity-WebVR-Test-Assets .

    When I ran a test a couple weeks ago it worked beautifully. Now, though, it's loading very incorrect views into both eyes once i switch from desktop mode to full screen (VR) mode. Desktop mode's camera looks fine (as you'll see), but I can't figure out what the heck is going on with the VR views in each eye.

    If you go here with your DK2 and enter VR, when you hit space it actually toggles between normal VR and what looks to be a similar wonky view setup as what I'm seeing in our demo: https://mozvr.github.io/sechelt/

    If anyone has ANY ideas what might be causing this, please let me know! Worth noting that VR works fine for this game in the Unity editor. Below is the link - you'll need Firefox Nightly (that + instructions here: http://mozvr.com/), and ignore the UI for now since it obviously won't work in VR, haha. Definitely unplug your positional tracker too, we didn't incorporate that. Just hit the full screen button to send it to your DK2.

    https://s3-us-west-1.amazonaws.com/boondogl-games/SECVRITY/index.html

    THANK YOU!
     
  2. J2014

    J2014

    Joined:
    Oct 20, 2015
    Posts:
    6
    fullscreenchange is not called,so sendmessage to unity vr is not called.i can not get positional tracker on mac os 10.11。
     
  3. AnthonyPalma

    AnthonyPalma

    Joined:
    Aug 11, 2013
    Posts:
    128
    @J2014 did you click the "full screen" button at the bottom of the game window? That's how you send it to the VR headset, but once you send it to the headset, the views are very wrong in each eye.
     
  4. J2014

    J2014

    Joined:
    Oct 20, 2015
    Posts:
    6
    31EBD996-F061-426B-85CE-6E8A3D87E17A.png i click it ,but brower does not call the fullscreenchange event.so the views are wrong
     
  5. J2014

    J2014

    Joined:
    Oct 20, 2015
    Posts:
    6
    IMG_20160314_132327.jpg IMG_20160314_132327.jpg it's just two camera render,not one camera render to the headset.so ui is wrong
     
  6. AnthonyPalma

    AnthonyPalma

    Joined:
    Aug 11, 2013
    Posts:
    128
    Sorry, so are you saying the code here that supposedly makes webVR Unity builds is wrong somehow? I'm trying to understand what you're saying...
     
  7. kearwood

    kearwood

    Joined:
    Apr 2, 2013
    Posts:
    1
    Please let me know if you are still getting incorrect WebVR rendering with the prefab / template. As a Firefox developer on the WebVR team, I would be glad to help out.
     
unityunity