Announcement

Collapse
No announcement yet.

Creating a radial menu similar to Paragon's communication wheel

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

    Creating a radial menu similar to Paragon's communication wheel

    Hi everyone. I'm trying to make a radial menu similar to the one Paragon has for their communication wheel. The way I think it works is that it draws a line from the center of the screen to the mouse position and highlights anything the line overlaps. Does anyone have any advice on how to do this? Here's an image just in case you have no idea what I'm talking about.

    http://imgur.com/rEmUufv

    #2
    Originally posted by PoisonedAce View Post
    Hi everyone. I'm trying to make a radial menu similar to the one Paragon has for their communication wheel. The way I think it works is that it draws a line from the center of the screen to the mouse position and highlights anything the line overlaps. Does anyone have any advice on how to do this? Here's an image just in case you have no idea what I'm talking about.

    http://imgur.com/rEmUufv
    I found these two videos over the youtube.
    https://www.youtube.com/watch?v=v45Q97kpDlk
    https://www.youtube.com/watch?v=7UAgZGQftiM

    Hope you find them useful

    Comment


      #3
      Originally posted by Gbr View Post
      I found these two videos over the youtube.
      https://www.youtube.com/watch?v=v45Q97kpDlk
      https://www.youtube.com/watch?v=7UAgZGQftiM

      Hope you find them useful
      The first one works, but doesn't make it easy to add additional items to the menu (i.e., it's not dynamic). The second video shows you how to set up a Marketplace asset that is depreciated.

      What you'll want to do is figure out how many options you want in your menu, and divide 360 by that number. We'll call that A. A is the angle between each item in the radial menu. Then what you want to do is make a ForLoop with the range of 0, to number of menu options, minus 1. The Index output from the ForLoop should be multiplied by A. We'll call the resulting value I. The Sin of I and the Cos of I will give you the menu option's x and y position at the given index within the loop, in the clockwise direction. We'll call that vector P. Multiplying P by a number will determine the menu's radius.

      By creating widgets on the screen via this loop, you know where you need to create the widget on the screen based on the current index in the loop.

      You can determine which menu option is selected based on joystick angle or mouse position using the following function:



      You can create the following in your character Blueprint to visualize how it works:



      Get Mouse Position Cartesian is a custom function that makes a vector from the center of the screen to the mouse position. Here is how it's made:

      Comment

      Working...
      X