The Project node is working fine in another function I have in my HUD, but the difference is that it is called directly from the Event Graph. This non-functional Project node is never called by the Event Graph, but only called by the Class Blueprint (“Barrel”).
I’m still interested in a solution that involves the HUD (I think performance would be better), but I’ve worked out an alternative that involves spawning a blueprint per damage number.
This function inside my destructible blueprint spawns the DamageText blueprint
The components of my DamageText blueprint: I set the rotation of the text to match the camera angle.
The event graph for my DamageText blueprint: this controls where the DamageText spawns and how it despawns.
The in-game result: Don’t mind the clipping, I haven’t gotten around to improving the fade out animation yet.
The first commented section must be wired in a BP with HUD.h as parent.
The second one you have to put it in your class BP where you want to tell the damage to show, but it must be executed at least once before you want to show the damage or else it will give you a null variable error.
The third section is all you need to do to show the damage in screen, just replace the random float with your damage data.