Author Topic: making 2-d labels following characters  (Read 1314 times)


  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
making 2-d labels following characters
« on: March 28, 2014, 04:21:17 AM »
i am trying to built a online game where in the scense, there are many players moving around. 
i would like to put the name of the player on their heads by adding label widget on their gameobjects, 
but once they rotate, the labels also rotate, and make the labels cannot be saw when the characters are rotated in 90 or 270 degree.
how can i make the label correctly facing to the camera by not using script to stop it rotation?


  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: making 2-d labels following characters
« Reply #1 on: March 28, 2014, 05:02:06 AM »
Move the game model to be further down in the hierarchy so you don't rotate on the "root" object, but on the model itself instead. Then your UI element will stay put.

Instead of:

*MyGuy (rotates and positions)


*rootobject (positions)
**MyGuymodel (rotates)
**Nametag (follows parent)

Alternatively, you can put in a script on the nametag that makes it face the camera every update. Use the Lookat function.