Search Unity

How to match game view to VR view? - Cardboard

Discussion in 'Daydream' started by dmennenoh, Dec 2, 2017.

  1. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    I am building for Cardboard / iOS and my app will run on an iPhone 7 only. One of the things I have to do is play a video and it is attached to the camera and should be 'full screen'. In the Editor the video looks right where I want it - I can see the whole thing but don't see edges. When I build and look at it on the phone the video is way too close to my face - I'm going to need to move it back from the camera quite a bit.
    Problem is I really don't know how much without moving, building, testing... etc. And I'm on Windows using Cloud Build (which is great) but it's like 30 min for a cycle.
    Wondering if there's a way to see the same thing in Editor I see on the phone...
     
  2. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    It will depend on which cardboard viewer you are using since the FOV changes between viewers. Those with a smaller FOV will make the video look closer, those with a larger FOV will make the video look smaller. You can do some math with the FOV or projection matrix to determine the distance for optimal pixel coverage.

    The Google VR SDK for Unity (https://developers.google.com/vr/unity/) has an emulation mode for editor play mode which mimics the display properties of common headsets. You might want to try that out to get faster iteration times.
     
  3. davedevN

    davedevN

    Joined:
    Jan 2, 2018
    Posts:
    7
    If you just need to vary one parameter like distance, you could make a control to move your video to certain distances or even have it animate through distance values and display the values with text. Then build, run, see what you get.