Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BABABLACK_911

Pages: [1]
1
NGUI 3 Support / Re: How do I create a 3D rts style health bar?
« on: July 04, 2014, 06:08:41 AM »
Windward has a 2D HUD. Unit HUD is a prefab containing HUDText, unit's name (label), and a pair of sliced sprites showing health. This prefab also has a UIFollowTarget script on it. Both UIFollowTarget script is a part of HUDText package available for sale. If you do a search for it here, I've actually posted code for UIFollowTarget in the past.


Is there any way to do it without the HUD text plugin?

2
NGUI 3 Support / Re: Health Bars at 3D objects feet
« on: July 04, 2014, 06:04:41 AM »
If you want them to be in your world, add a UIPanel to a game object, then add a widget to it like you would if it was your UI. You can position the panel (or your widget) like you would any game object.

If you want them to be overlayed, then set up a 3D camera with the same camera angle as your main camera and set it to draw after the main camera. Place your widgets on the XZ plane (assuming the characters stand on XZ), and it should keep the same tilt visually. You will still want to position them correctly underneath your characters by using math.

Hey Aron, thanks for the answer but i'm still having issues with this.

I mean I took a cube, made an empty gameObject a child of the cube.Attached UIPanel Script to it, made a widget a child of this panel GO and placed a sprite as a child of this widget. What I now see is that the sprite gets ENLARGED.

Also I still didn't get what you meant by  "add a UIPanel to a game object, then add a widget to it like you would if it was your UI. You can position the panel (or your widget) like you would any game object." Need more details in it. Thanks.


EDIT : Something like this?


Pages: [1]