Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: johnessy on August 31, 2012, 07:00:13 AM

Title: Unit Health Bar
Post by: johnessy on August 31, 2012, 07:00:13 AM
This has probably been asked a million times and infact i seen a post about it a while ago. We have a 3D space game and need to get a health bar above the enemy unit. Obviously this need to follow the unit and scale so that it is the same universal size.

Any help would be greatly appreciated.
Title: Re: Unit Health Bar
Post by: ArenMook on August 31, 2012, 02:18:09 PM
Space Game Starter Kit does just that, and in space to boot. UI items follow 3D objects and scale as you get closer to them. Another version is in the HUDText -- without the scaling, but the idea is the same. Convert coordinates from screen space of one camera to screen space of another camera.