Scene Actor's bounding square (screen space)?

Hi Ian,

Your solution worked out great!

I had 50% similar (ish) scripting so didn’t have to re-script everything, but the most important part was the ‘box calculation’ (Uppermost / Leftmost / Rightmost / Lowermost points) which is where I got stuck. Your screenshot solved my problem so thanks for that.

Just so I can add a note for future reference: can you briefly explain why the local/absolute size multiplier was necessary?
i.e.,

[Get Player Screen Widget Geometry].GetLocalSize()

[Get Player Screen Widget Geometry].GetAbsoluteSize()

I would never have thought to use the local/absolute division as a multiplier, but noticed that the bounding rect does not work without that multiplication.

>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

The loose rect solution is fine for my purposes as it is only a general ‘region tracker’ and doesn’t have to be exact (for now).



>(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.)

If I later need a tighter bounding rect I’ll probably experiment with a sphere (capsule?) trace to get the points representing the furthest hit extents on an actor’s mesh (top/bottom/left/right from the camera’s view) . I could then project those four points to screen space, calculate a rect and draw the 2d bounding box. Not sure if it would work, but would be a good place to start.

Cheers!