Author Topic: Hud system  (Read 4481 times)

omira

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Hud system
« 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/ it's a floating box around the selected item + info's, i have no idea how to start :D
« Last Edit: April 29, 2012, 11:44:38 AM by omira »

Sarus

  • Guest
Re: Hud system
« Reply #1 on: April 30, 2012, 06:59:25 AM »
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


omira

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Hud system
« Reply #2 on: May 01, 2012, 11:23:11 AM »
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 :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Hud system
« Reply #3 on: May 01, 2012, 11:34:56 AM »
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.

omira

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Hud system
« Reply #4 on: May 02, 2012, 02:55:28 AM »
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/
« Last Edit: May 02, 2012, 09:45:15 AM by omira »