Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: omira on April 29, 2012, 11:37:47 AM
-
ok, i'm trying to create a HUD system like the on this picture: http://imageshack.us/photo/my-images/36/exampleqv.jpg/ (http://imageshack.us/photo/my-images/36/exampleqv.jpg/) it's a floating box around the selected item + info's, i have no idea how to start :D
-
Read this thread: http://www.tasharen.com/?topic=creating-a-ui-sprite-on-the-fly
ArenMook was nice enough to also provide a download of the sample project so you can see how it works (making a healthbar float over the characters heads)
You can download the sample project here:
http://www.tasharen.com/ngui/gt.unitypackage
-
thx for the examples, great help for me :) but one problem is still left for me: placing labels/sprites in the middle obove/under a opject is no problem, but how do i get/calculate the coordinates of a corner from a object? any ideas?
sry for my bad english :(
-
That's a math question, not a UI question :P
You'll need to calculate the bounds of the object and using that -- calculate the corners in a way that makes them always face the camera. It just involves a lot of math.
-
It just involves a lot of math.
Hard way, but i got it :P
thx for the hints
thats my result: http://imageshack.us/photo/my-images/137/hudtest.jpg/ (http://imageshack.us/photo/my-images/137/hudtest.jpg/)