Author Topic: Health Bar problem  (Read 3154 times)

digO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Health Bar problem
« on: May 06, 2014, 08:43:36 PM »
I'm having some problem to my health bar follow my gameObject.
Its following my gameObject but its moving a little when the gameObject moves, i wanted the health bar have a fixed position above the gameObject.
You can see what im saying in this video.
https://www.youtube.com/watch?v=ozyMtqZkCpU&feature=youtu.be

And this image show a bit what i did to put the health barabove the gameObject.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Health Bar problem
« Reply #1 on: May 06, 2014, 10:18:27 PM »
Instead of moving the health bar, move the point it's following.

Create a "health bar attachment" point underneath your 3D object and position it where you want the health bar to be (for example: above the character's head).

digO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Health Bar problem
« Reply #2 on: May 06, 2014, 11:51:36 PM »
Instead of moving the health bar, move the point it's following.

Create a "health bar attachment" point underneath your 3D object and position it where you want the health bar to be (for example: above the character's head).

im alredy doing that, as you can see this prefab called "1" is my spider gameObject and i created a child called "DamageText" to put my healthbar to follow the gameObject.
so when the spider moves it will follow above the character, but if u see the video its not like as i expected.

digO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Health Bar problem
« Reply #3 on: May 07, 2014, 08:49:44 PM »
all right, its perfect now, thanks for your reply.