playMaker

Author Topic: Health Above Enemy  (Read 865 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Health Above Enemy
« on: June 13, 2021, 07:40:26 AM »
Hello,

I have an enemy with health, and I have a health ui, but for some reason, I can't get it to show up above the enemy's head. I tried using both world space and screen space overlay, but it didn't seem to work. I want the health ui to move as the enemy moves, which is the tricky part. It is also a child of the enemy. Not sure what I'm doing wrong. Thanks in advance for your help!

John Bassi

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Health Above Enemy
« Reply #1 on: June 14, 2021, 02:59:05 AM »
Need some more info on the setup w/ screenshots if possible.
Available for Playmaker work

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: Health Above Enemy
« Reply #2 on: June 14, 2021, 09:57:18 AM »
What info would you like? Playmaker FSMs or something on the unity editor and if so what? Thanks!

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Health Above Enemy
« Reply #3 on: June 14, 2021, 11:01:13 AM »
Do you use an asset for that, if not some screenshot of the states of the FSMs in charge of the function.
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Health Above Enemy
« Reply #4 on: June 14, 2021, 04:36:11 PM »
Hi.
If you use world space you can set the canvas as a child to Enemy.

Other way is to use screen to world point

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: Health Above Enemy
« Reply #5 on: June 21, 2021, 02:17:00 PM »
I tried setting it as a child to the enemy. How do I use screen to world point? Thanks!