Actor Selection Brackets

Hello every one!

I’ve seem to hit an issue when testing some ideas out in blueprints. I want to make actor selection brackets (context brackets?). I made a rough prototype using Draw Line for HUD, but I feel there maybe a better, more efficient, and simple way. I initially thought I could use a texture, but that will run into scaling issues for various sized objects.

Is there a better way for doing this?

I saw an old tutorial from UE3 that has an kismet BP with this functionality (UDK | DevelopmentKitGemsCreatingActorSelectionBoxesOrBrackets), but it seem there little in common with UE4 BPs.

I’ve attached some screenshots with the results of the BP, the BP setup I used, and how I’d like them to eventually look similar to.

Any help on this question would be greatly appreciated, thank you!

How is the scaling supposed to work? Is it distance based, is it target size based, is this fixed size? A combination of factors perhaps?

Have you tried a 9-slice widget border - a widget element whose central area can stretch while the borders maintain aspect ratio - see here and check Setting Border States section here. This would also allow you to easily incorporate text easily since it’s a widget.

Also, there is a thread in the forums (a hover tank game I believe) where it’s the mesh screen size that dictates the scaling - not sure if that’s what you’re after, though.

Thank you Everynone, you have been most helpful!

The 9-slice widget border I feel, is exactly what I need. I did not think of widgets as a possible solution as I’m not used to such fancy UI tools, and I am ignorant of many of the features of UE. This will make things easier than expected, especially the corner scaling.

I was thinking of simply drawing a texture to screen and scaling it by how you mentioned–mesh screen size–up/down to a certain size. Naturally, distance will also cause scaling to occur through a perspective view. The brackets will be clamped to a certain minimum(very small objects)/maximum(very large objects) size, and perhaps the brackets will scale for tiny objects, but retain their thickness. Deusex and Neocron are two examples of bracketing systems I like most, so I’ll spend some more time studying them and how best to emulate their function.

Thanks for all the help!

See if this can kickstart something. It’s a crude implementation and the numbers would need tweaking but it could be a start:

The widget is just a 32x32 border drawn as Box with big margins:

And it clamp-scales based on the distance to the target and its size:


Again, the numbers need tweaking. May need extra work if you need the bracket non square.

@TheJamsh regarding:…n-screen-space - object bounds in screen space

I can swear you posted a neat C++ based solution to this. I only found the above thread, though :expressionless: Any chances you could unearth it or suggest a good keyword for searching?

Thank you for all this info and effort Everynone; it has really helped! This is an exceptional starting point.

I did, but unfortuantely it was on the Wiki that Epic decided to terminate with no prior warning. Luckily there’s a backup here. It’s a bit dated but it may still work!…ds_of_An_Actor

Wicked. That’s the exact thing! Thank you.

Wow-wee! That looks very nice, TheJamsh It seems in my quest to find guiding documentation on this sort of feature, Battlezone-esque gameplay has been a common style! The tank looks very spiffy!