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 GetPlayerController(0)
, but this has issues with splitscreen/multiplayer, and just generally seems like a hack.
Wondering if there’s a neat solution to this with either screenspace option.