Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Change camera field of view (fov) in VR mode

Discussion in 'AR/VR (XR) Discussion' started by jules43, Sep 13, 2015.

  1. jules43

    jules43

    Joined:
    Jul 20, 2015
    Posts:
    10
    We've been experimenting with a zoom feature in our VR app and it seems to work pretty much how you would expect. With the earlier custom Oculus and Cardboard integrations we've done this by overriding the left and right eye camera field of view as needed.

    This is a pretty essential feature for our app, is there a way to do it in the built in VR integration? The VR Overview section of the VR Docs seem to imply it is not.

    As with the ability to show different content to the left and right eye, this would seem to be an essential feature.

    Thanks

    Jules
     
  2. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    I've experimented with changing the FOV of the cameras in the pre-5.1 Oculus integration to zoom on a video sphere, and personally I found that it gives a strong sense of motion sickness if you look around with anything but the pre-calculated FOV. I think there's a good reason why FOV shouldn't be changed.
     
  3. jules43

    jules43

    Joined:
    Jul 20, 2015
    Posts:
    10
    That's interesting, our experience so far has been that a zoom mechanism is intuitive and provides a reasonably good experience.

    Either way, in general I don't want my tools to decide something like this for me, in a new field people need to be able to experiment, as it sounds like you have. Without the ability to try it we wouldn't know whether there is a useful application.
     
  4. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    I don't think it's Unity, but Oculus itself deciding that developers shouldn't be allowed to mess with the pre-calculated, hardware dependant FOV on the HMD. They don't want users having a bad experience because of software that makes incorrect use of it.
     
  5. EyePD

    EyePD

    Joined:
    Feb 26, 2016
    Posts:
    63
    Actually Oculus is claiming that it is indeed Unity in this thread on their forums. They suggested manually overwriting Unity's setting in an Update function. I'm not sure if that will work timing wise but I'll try it at some point. If anyone has made any progress on this please let me know.
     
  6. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    One can (at least in 5.5 currently) override the FOV setting with a script, but the change does nothing to the VR camera, the value is just ignored. Drat.