Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Apr 2013
Offline Last Active May 29 2014 07:58 PM

#5132536 2D Health Bars for Units in 3D Environment

Posted by on 18 February 2014 - 08:43 PM

Search for "directx billboards" or "opengl billboards". The basic idea is to project screen aligned 2d geometry into the 3d world.

Ok guys, I think billboards are basically going to work for me. But I appreciate all of your answers, they were all good. I also don't mind the health bars getting smaller in the distance, so thats the reason I went with billboards. Thanks.

#5132159 2D Health Bars for Units in 3D Environment

Posted by on 17 February 2014 - 04:43 PM

Hi guys,


I am making a 3D RTS game with Direct3D. Basically, I want to make 2D health bars hovering over my units that show how many hitpoints they have left after receiving wounds. I'm not sure what a good way to go about this would be because the thing is, the health bars have to always face the camera, no matter what angle they are at from the center of the viewport. I also want them to look as close to perfectly rectangular as possible, but I want them to look smaller if they are farther away.


I don't want to post code, so I'm just looking for a "general concept" type of answer.