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

Cardboard HUD

Discussion in 'AR/VR (XR) Discussion' started by Kattoor, Mar 19, 2016.

  1. Kattoor

    Kattoor

    Joined:
    Oct 25, 2015
    Posts:
    2
    I'm trying to create a HUD which consists of a 2D gun image, using the Cardboard SDK.
    However, this is what happens when I put a canvas with the image under the 'Head' GameObject of 'CardboardMain':


    As you can see, by looking sideways it stays in its place, but when I look up or down it somehow moves.



    As you can see in the above image, by looking up (or down) the distance between the canvas and the camera seems to increase. I guess this is what causes my issue. Any thoughts on this?

    Help would be greatly appreciated!

    Thanks for reading.
     
    Last edited: Mar 19, 2016
  2. AlexKrunch

    AlexKrunch

    Joined:
    Feb 17, 2016
    Posts:
    12
    I am using the same trick of a 2D gun object, but didn't encounter your issue.

    Here is how I did it (I don't know if it's the best way but it's works, and I am open to critics):
    -I put my HUD in the MainCamera object
    -I didn't use canvas, only spriteRenderer

     
  3. Kattoor

    Kattoor

    Joined:
    Oct 25, 2015
    Posts:
    2
    Welp, it seems this was caused by me setting the scale of my CardboardMain object to (x,y,z): (1,2,1).
     
    AlexKrunch likes this.