# Behaviour of a healthbar like dota2 in unreal engine 4

**URL:** <https://forums.unrealengine.com/t/behaviour-of-a-healthbar-like-dota2-in-unreal-engine-4/463206>\
**Category:** UI\
**Tags:** project-world-locati, unreal-engine, Widget, UE4, question\
**Created:** [April 2, 2020, 2:45pm UTC](https://forums.unrealengine.com/t/behaviour-of-a-healthbar-like-dota2-in-unreal-engine-4/463206 "2020-04-02T14:45:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_fa9d2fa4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fa9d2fa4](https://forums.unrealengine.com/u/anonymous_user_fa9d2fa4)\
**Post date:** [April 2, 2020, 2:45pm UTC](https://forums.unrealengine.com/t/behaviour-of-a-healthbar-like-dota2-in-unreal-engine-4/463206/1 "2020-04-02T14:45:04Z")

</div>

I am having a problem where in I want my health bar to behave like dota2/lol. right now is that I summon 4 minions and they all have health bars on top of there head( a floating widget) but the problem is that whenever the minions turn around the health bar also follows and I don’t want that because dota2 minions the behaviour of their healthbar are static only and doesn’t move even the minions are rotating. Is there a way in unreal to freeze a widget that is set to world like unity rigidbody that can be freeze rotation and position something like that.

#EDIT

By the way to add more information I am using the Top Down Template in unreal engine.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 2, 2020, 3:03pm UTC](https://forums.unrealengine.com/t/behaviour-of-a-healthbar-like-dota2-in-unreal-engine-4/463206/2 "2020-04-02T15:03:41Z")

</div>

- if you’re using a Widget Component for this, switch its _Space_ to _Screen_ mode - it will then behave more like a 2d widget but with automatic screen tracking

- if you’re using a Widget Component and want to keep it 3d, update its orientation to face the player camera onTick

- if you’re using a traditional 2d widget, have the actor update the widget’s position onTick (do not do that in the widget) using [Project World To Screen](https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/ProjectWorldtoScreen/index.html) node, for example

Those 3 methods have their own advantages and disadvantages.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fa9d2fa4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fa9d2fa4](https://forums.unrealengine.com/u/anonymous_user_fa9d2fa4)\
**Post date:** [April 2, 2020, 3:20pm UTC](https://forums.unrealengine.com/t/behaviour-of-a-healthbar-like-dota2-in-unreal-engine-4/463206/3 "2020-04-02T15:20:24Z")

</div>

I found my solution actually that suits very well with my problem. But thanks anyway sir
