Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to show 2D UI fixed in 3D World

Discussion in 'VR' started by Blue007422, Mar 2, 2017.

  1. Blue007422

    Blue007422

    Joined:
    Mar 2, 2017
    Posts:
    7
    Hello,

    I'm currently working on a application on Hololens.
    But I'm facing a problem.
    Context :
    - I have an application with fixed UI (as explained in this topic https://forum.unity3d.com/threads/unity-ui-on-the-hololens.394629/) with classic 2D UI (buttons, etc)
    - I'm showing several Holograms

    My Problem :
    - I would like to show information about the hologram. I need these information to be 2D UI (with canvas, etc) and to be fixed in the 3D World (and facing the user -> Billboard.cs from HoloToolkit)

    Is it possible to do it ? If yes, how ?

    Thanks for reading.

    Don't hesitate to ask for further information
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    There are a few ways, you could use the Billboard.cs from HoloTool Kit.

    Basically you need to implement a few pieces:
    -Anchor for the position with a world lock
    -Then have the object use the transform.LookAt() to look at the camera

    There are probably more than a few ways to do this
     
  3. papiot

    papiot

    Joined:
    Jan 27, 2015
    Posts:
    10
    What Wesley said, plus you might want to save the anchors to the local storage device so when you launch the app it brings them back to the same position. Have a look at WorldAnchorStore