Display enemy healthbar oriented towards viewing player with occlusion
With healthbar there are 2 major options, screenspace or worldspace. Both have a problem:
Screenspace: Occluding the healthbar based on terrain and such is problematic/hacky, requires some way of finding all the the healthbars/owners of healthbars, checking LoS manually, and then enabling/disabling the element based on this. We did this, but the LoS check is overly simplistic, and only checks for the center of the actor. Thus with 2 enemies one in front of the other, you'll usually only see 1 healthbar, even if they're offset enough that you'd expect to.
Worldspace: Healthbar isn't oriented towards player viewing it (rotates with the actor it is placed upon). There's a hacky solution to this where you just rotate towards the LookAt for
Wondering if there's a neat solution to this with either screenspace option.
asked Feb 06 '19 at 05:35 PM in Using UE4
A material-based solution is probably what you need. That way each camera can correct the objects facing in world space. At the bottom of this link is an example that is done for foliage cards in the distance.
answered Feb 06 '19 at 05:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here