I'm drawing a health bar on top of each player. I transform 3d position to 2d. I would like to draw it smaller when distance increases. Any simple math for that? Let's say bar width is 30 and height is 10 it looks good only on distance == 100. What formula should I use to make it decrease in size when distance increases?
Should resolution of the game be taken into consideration?