Healthbars disappearing when ai goes offscreen
Hi everyone! Can anybody guess what's happening here?
The blueprint scheme consists on a character blueprint (enemy) containing a reference of the widget blueprint (healthbar). The enemy blueprint creates the widget during the EventBeginPlay as follows:
And the healthbar widget graph looks like this:
I've tried adding the widget to viewport every tick (on the enemy blueprint) but it didn't work (the isInViewport boolean always returns true). I would try to fix this in a patchy way, but I don't even know what originates the problem.
Any help provided would be appreciated!
asked Oct 10 '15 at 08:45 PM in Blueprint Scripting
It seems Event Tick stops getting called when it goes off-screen in 4.9. Workaround is to have all your Event Tick functionality called on a timer instead. See https://answers.unrealengine.com/questions/296904/widgets-are-disappearing.html
answered Oct 16 '15 at 04:50 PM
If it's just the healthbar you want (no text, names etc.) it would be more practical to use a billboard material. You can create a healthbar in materials by using a linear gradient and clamps.
answered Oct 16 '15 at 03:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here