Health Bars & Player UI

So, if like me you wanted the health bar only displayed on other tanks whilst your own is displayed in the UI along with your ammo and crosshair, theres a node for the WidgetComponent called Set Owner No See


4 Likes

Thanks for sharing Dan

Thanks for the tip!

Note that it only works when it’s drawn in world not screen. also watch the fact that these have collision, Change the Collision preset to no collision.

I believe there’s a collision preset for UI

1 Like

moving ahead in the lecture I noticed you found a different way to approach the problem with EEC_Camera on linetrace method in PlayerController.

I tried doing this from the details panel having the widget component selected, there’s a property you can check called “Owner no see”. The thing is that doing it on that place doesn’t work, why is different from your way?

Cheers!

Probably a bug.

I did it your way and I’m still having the problem. I googled the issue and UE has a bug exactly with that but is working for you so I’m pretty confused right now…

On the other hand, the Q&A with the bug report I found was from 2015 so they had plenty of time to fix this.

Different engine version?

4.17 bro

Made this topic under 4.12 or 4.13 so might be that.

Adding on to this conversation, setting “Owner No See” on a widget with a User Interface: Space = Screen does not work. It is a known bug.

Login here and vote so this bug gets fixed: https://issues.unrealengine.com/issue/UE-48546

Work around:
Inside of the initialize HealthBar we can check if this is the player controlled Tank and set Hidden In Game.

Privacy & Terms