How can i make a floating health bar on enemy?

  1. Create a Widget Blueprint with a Vertical Box. Inside it add a progress bar.
  2. Set the anchor of the Vertical Box to center.
  3. Create an Actor blueprint and name it “HealthBarWidget” . Add two Widget components. (One for original rotation of your side scrolling character and one when it rotated 180.
  4. Set both of these widgets : Widget Class to “Health Bar” (or whatever you named your widget blueprint)
  5. In your character, add a child actor component of the Child Actor Class : “HealthBarWidget”

You will need to bind your progress bar to the health of your character in the widget blueprint.
I hope this helps.

3 Likes