Search Unity

Distances in Unity aren't making sense on device/in emulator

Discussion in 'VR' started by WithinRafael, Aug 13, 2016.

  1. WithinRafael

    WithinRafael

    Joined:
    Jan 5, 2014
    Posts:
    6
    I have three cubes at 5, 10, and 15 units away, relative to the camera. When I deploy this to the device/emulator, these cubes are clearly not 5, 10, or 15 meters away -- what's the true relation between units and meters?

    Everyone I've asked thus far seemed confused -- it's very concerning, I must admit. Are people just eyeballing this stuff?

    Test project: https://1drv.ms/u/s!AnjdAnZZcu-GotcPOOXwwBxn6EYgWg

    Screenshot attached.
     

    Attached Files:

  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    1 unit is definitely 1 meter. On the real device it is. How do you know it's not in the emulator? I suppose it's kinda hard to measure it there without a real world meter being next to it.
     
  3. WithinRafael

    WithinRafael

    Joined:
    Jan 5, 2014
    Posts:
    6
    Deploy it to your real device, do the cubes look like they're at 5, 10, 15 meters away? Mine didn't.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Well my room isn't large enough to place it 10 meters away :D. It just appears behind the wall. But 5 units away definitely places it 5 physical meters away from me.
     
  5. WithinRafael

    WithinRafael

    Joined:
    Jan 5, 2014
    Posts:
    6
    If you deploy this on device, you won't see the 5 meter cube -- just what appears in the screenshot above. Did you test the attached project? Is the FOV narrower than 60 on the device perhaps? (That's the default in Unity.)
     
    Last edited: Aug 17, 2016
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Camera FoV setting has no effect on the physical device. It will always be constant to what the device can actually display. It's way lower than 60, I can't remember the exact number, though.
     
  7. WithinRafael

    WithinRafael

    Joined:
    Jan 5, 2014
    Posts:
    6
    Right, I suspect this is the source of my inconsistent experience. The Unity FOV for HoloLens dev is incorrectly set to 60. I set it to 25.3 which seems to align but how we don't have official numbers this late in the game is mind boggling to me. Hoping you can shed some light on this!