Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: How do I keep a billboard the same size on screen regardless of the cameras position?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2010
    Location
    us
    Posts
    11

    How do I keep a billboard the same size on screen regardless of the cameras position?

    I recently added a billboard to display a character's name into a game. It looks good except for I would like to keep the name the same size on the screen regardless of how far the camera is from other players. How can I do this?

    This is a 3D game being written using OpenGL ES 2.

    Any help is appreciated.

  2. #2
    Intern Contributor
    Join Date
    Mar 2012
    Posts
    80
    You can project the position of the players into window coordinates (using gluProject or custom matrix math) and then render name tags in an orthographic projection. I think you can also set the model-view-projection matrix's values to 1 at indices 0, 5, 10 to remove scaling. I am not sure on that one though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •