Hello,
I cannot reproduce the tighter fit bounding box solely in Blueprints, but I can get you everything after that point, and the simpler 3D-bounding box in 2D space method:
For this example, I simply create the widget in the level BP, and assign it to my Actor.
Level BP:
Next in the widget, we create an override function for OnPaint, that draws a box from the top left corner to the bottom right.
Overriden Function in Widget “OnPaint”:
Most of the heavy lifting goes on in the widget blueprint’s event graph. First we calculate the 8 vertices that make up the 3D bounding box.
I have a debugging method to visualize these points, but you can skip or disable it as you see fit. I’ve run out of screenshots, but you can see it in the BlueprintUE link.
Next we convert these 3D points into 2D points on screen. (Its worth noting that if you can find a way to get a more accurate series of points representing your mesh, such as socket that you place at the extents of every joint, you can leave the rest of the code unchanged.)
Then we recalculate the box by finding the uppermost point, and the leftmost point, and combined them to make the top left corner. Similarly we find the rightmost point and the lowermost point and combined them to make the bottom right corner.
Widget Event Graph:
Once thats all set up, you can test the effect by running play-in-editor
Here is a video sample of the end result: