Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[VR] Field Of View

Discussion in '5.3 Beta' started by Thomas-Pasieka, Oct 2, 2015.

  1. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Currently the Field Of View of my camera gets changed to 106.188 every time I press the Play button which makes for a very odd/nauseating VR experience to say the least. Anybody else experiencing this in 5.3?
     
  2. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Anyone? This is happening in Editor and Build.
     
  3. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I believe this is expected behavior when you're using the "native VR integration". IIRC, that field of view is the one required by Oculus to work properly. I guess they'll have another FOV for the native Playstation VR integration, and maybe another one for Gear VR.

    If the camera renders to a texture, this should not happen, and if you don't have "Virtual Reality Supported" checked, it also shouldn't happen.

    Now I could start my usual rant about the "just tick a checkbox" way of adding VR to Unity ... but I won't because I already did. Here's the links:

    http://feedback.unity3d.com/suggestions/improve-the-design-of-native-vr-integration

    http://forum.unity3d.com/threads/id...gn-of-the-native-unity-vr-integration.342830/

    ;-)
     
  4. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    The problem is that it seems to be buggy. What you get now often is a fisheye view through the Rift.
     
  5. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    From the docs: Head tracking and appropriate FOV is automatically applied to your camera (if your device is head mounted).

    However, with 5.3 you should be able to set the FOV from script to override the FOV (possibly after 1 or 2 frames). Have you tried that?
     
    Thomas-Pasieka likes this.
  6. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    ~106 is the correct FOV for DK2 -- each device has a default FOV that results in 1:1 view / tracking. It should not look fisheye.

    There is a bug in 5.3 Beta 1 where this FOV isn't always applied and sometimes you'll see it stay to default of 60. This is fixed in Beta 2.

    As @amirebrahimi_unity said, in 5.3 you have the ability to override the FOV if necessary for different gameplay elements. You can either drag the camera's FOV slider in the editor in playmode, or write a script to change the camera's fieldOfView field (if you want it to persist). If at any time you want to go back to the device specific FOV, you can call Camera.ResetFieldOfView().

    If you are seeing different results between 5.2 and 5.3, like fisheye you described, please post more details.
     
    Thomas-Pasieka likes this.
  7. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    The fix for this issue missed the Beta 2 cutoff. Expect it in Beta 3.
     
    Thomas-Pasieka likes this.
  8. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    This is still happening in Beta 3.
     
    info-360-vid-ca likes this.