Announcement

Collapse
No announcement yet.

Actor Selection Brackets

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 (https://docs.unrealengine.com/udk/Th...rBrackets.html), 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!
    Attached Files

    #2
    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.

    Comment


      #3
      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!

      Comment


        #4
        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:

        Click image for larger version  Name:	widget.jpg Views:	0 Size:	63.0 KB ID:	1783095

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

        Click image for larger version  Name:	Untitled.png Views:	0 Size:	566.7 KB ID:	1783096

        vid: https://i.gyazo.com/ab795c549cd50eb7...497f31a53e.mp4

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

        Comment


          #5
          TheJamsh regarding: https://forums.unrealengine.com/deve...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 :| Any chances you could unearth it or suggest a good keyword for searching?

          Comment


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

            Comment


              #7
              Originally posted by Everynone View Post
              TheJamsh regarding: https://forums.unrealengine.com/deve...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 :| Any chances you could unearth it or suggest a good keyword for searching?
              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!

              https://www.ue4community.wiki/Legacy...ds_of_An_Actor

              Comment


                #8
                Wicked. That's the exact thing! Thank you.

                Comment


                  #9
                  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!

                  Comment

                  Working...
                  X