Search Unity

Cannot set field of view on camera with name PlayerCam while vr is enabled in Megacity demo

Discussion in 'Entity Component System' started by castana1962, Mar 20, 2019.

  1. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    I am trying the Megacity demo and added the StearnVR plugin to see in my own VR Heaset
    I adde a CameraRig prefab to Steam VR plugin in my scene and I see succesfully the Megacity Menu but Black the Megacity game and I got the following warning
    Cannot set field of view on camera with name PlayerCam while vr is enabled
    I disabled the PlayCam but I cannot fix this problem, for it, Is there any way to see the Megacity game in my VR Headset?
    Please let me know how fix it?
    Thanks
    Alejandro
     
    Gaoqilong1995 and sg_raumgleiter like this.
  2. davidv_unity

    davidv_unity

    Unity Technologies

    Joined:
    Nov 14, 2018
    Posts:
    15
    Hi,
    This does not seem to be related to what you described in the GitHub issue.
    The FOV (field of view) of the headset is a physical property and I assume that the camera in Unity therefore does not allow to change it. Are you familiar with making VR applications already? Otherwise I suggest that you have a look at https://unity3d.com/learn/tutorials/topics/xr/getting-started-vr-development
    MegaCity will also work in VR although you might need to tweak some things in there, as currently the streaming is using the car's/player's position and you might want to change that to your position when it is not attached to that.
    You can modify this in StreamingLogicSystem.cs - I'll get back to you regarding the GitHub issue in Github directly which makes it easier to keep track. Hope that helped.
     
    Gaoqilong1995 and castana1962 like this.
  3. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi davidv-unity
    Since I am Oculus/HTC VR developer, I am very happy you told me that Megaicty will work with VR. If you could advice me about what I have to modify to do Megacity VR Ready, I would appreciate it a lot...
    One more time, thanks for your help and patience
    Best Regards
    Alejandro
     
    Gaoqilong1995 likes this.
  4. Gaoqilong1995

    Gaoqilong1995

    Joined:
    May 22, 2017
    Posts:
    1
    Hi,
    Have you solved it?I have the same problem。
    Please let me know how fix it?
    Thanks
     
    CosmicStud likes this.