Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Unity Screen Space Canvas Sizing Incorrectly On ARCameras

Discussion in 'Vuforia' started by bstudios_fpride, Jan 11, 2019.

  1. bstudios_fpride

    bstudios_fpride

    Joined:
    Jun 27, 2018
    Posts:
    5
    After updating Unity to 2018.3 and Vuforia to 8.0.10, Unity's Screen Space Canvas doesn't size properly on the AR Cameras. I've tested them on normal cameras and they size perfectly for them. What appears to be happening is that the height of the screen space canvas appears to be inverted from the actual height. Closer to camera is taller, further away is smaller.

    I've tried creating a new canvas after the scene is running, I've tried switching a canvas between the AR Camera and normal cameras with the exact same camera component setup (it's correct for normal cameras), and I've tried resizing the canvas.

    Somehow, it appears that any camera controlled by Vuforia Behaviour is breaking my screen space Canvases.

    I've attached screen shots of various configurations below.

    OneHundred.PNG OneHundred2.PNG One2.PNG PointFour.PNG PointFour2.PNG
     
  2. bstudios_fpride

    bstudios_fpride

    Joined:
    Jun 27, 2018
    Posts:
    5
    If anyone else is having trouble with this, the only hack I've found that works is when I create a separate camera, make it cull everything and draw nothing, set all its values to match the AR Camera otherwise, and then use that for the screen space camera. Everything renders in front of the AR Camera and positions perfectly this way. It's a horrible hack, but it got the project working for now.
     
    RoastCoconut likes this.
  3. bstudios_fpride

    bstudios_fpride

    Joined:
    Jun 27, 2018
    Posts:
    5
    Ok, got an official reply on the Vuforia forums to this:

    "Hello,

    If you're using “Screen Space - Camera” and choosing the ARCamera, you should instead use “Screen Space - Overlay” to do Canvas UI work.

    Please download our samples for best practices on Canvas UI for use with Vuforia: https://developer.vuforia.com/downloads/samples

    Thanks,

    Vuforia Engine Support"
     
    meedabit likes this.