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. Dismiss Notice

how to make 3d gui inside game

Discussion in 'Scripting' started by like_a_boss, Feb 8, 2015.

?

how to make 3d gui inside game

  1. no idea

    0 vote(s)
    0.0%
  2. i have an idea

    0 vote(s)
    0.0%
  1. like_a_boss

    like_a_boss

    Joined:
    Jan 17, 2015
    Posts:
    15
    hi i would like to create something that wil display health amount above enemy as a number. i want it to be in 3d enviroment not as 2d overlay...could anyone point me the right direction? i dont need specific of coding but rather what to use as on overall solution for this. why it should be displayd in 3d enviroment and not as 2s camera overlay? couse i want to use it in Vr project.
    regards
     
  2. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    Well, I imagine you would need a camera designated to the GUI. Then, I would get the position of the enemy or what have you in the game world camera and convert it to the GUI camera position. Use an update to constantly monitor the positions.


    Look up WorldToScreenPoint();
     
  3. like_a_boss

    like_a_boss

    Joined:
    Jan 17, 2015
    Posts:
    15
    thx i found a solution with render textures but it is only for pro version of unity
     
  4. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    My suggestion does not require pro.