I want to hide my enemy overhead Health bars when I’m far away and when they are blocked by walls, etc. I know there is several ways to do this and I’m looking for a very performant solution, based on Camera LOS and Frustum. Thoughts? Thanks in advance.
So my current solution is to add a large collision sphere around the AI Base Actor that is 2000 units radius. when the Player character overlaps that collision the AI sends out a line trace to the player character that updates every 0.1 seconds. as long as that trace collides with the character and not something else the Meters above the AI heads will show. When the player goes out of range, I invalidate the looping Timer by Event that was refreshing the trace every 0.1 seconds and hide the meters over the AI heads. This seems to work overall quite well. I may need to tweak as enemies overlap each others trace lines temporarily blocking other’s, but I’ll probably add a rule to ignore pawns. But overall seems fairly performant, if someone else has an even better way please let me know!