I am trying to create a radial menu using UMG widgets but I can’t find anything that would work. Anyone have any ideas?
I had a basic idea of how to do all that, but the main thing I was having trouble with is that in most games there isn’t an actual mouse that appears but rather a it senses the mouse movement and then moves the selection accordingly. Have any idea how that’s done?
The pie menu on the marketplace does this by setting 8 images together with an achor at the center, location 0,0 and a pivot of 0.5, 0.5
The images are actuallyb uttons with images set on them.
Then when you move your move to one image it changes it slightly (a new image) and then when you click it removes all images (setVisibility forEach loop) and then opens the menu needed for that part of the oct-tant which repeats itself if needed.
Its quite complex but those two sentances are the basis of a pie menu.
If you want the hold-and-release setup make sure InputAction(xxx) or KeyEvent(xx) Pressed → CreateWidget(PieMenu) → addToViewport(piemenu) and released (removeFromParent(pieMenu)
Better yet create an event dispatcher or boolean and custom events to open/close it as needed using things like isKeyHeld wasKeyJustPressed etc. nodes.
Hope that helps its not easy thats why its 10$ on the marketplace and I dont really want to cheat the developer by posting the blueprints or explaining it in extreme depth.
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.
The way I would solve this is to keep a Vector (only using the X and Y component) in your Player Controller that is used to determine the selection of the radial menu. In the methods that handle mouse X and Y, update the Vector by incrementing that coordinate with the mouse move value. Clamp it to some low value (-1 to 1 maybe?) to make it easy to rotate back and forth. Then use the angle of this vector to determine the menu selection.
If the movement is too snappy, you can either adjust the clamp value, or add a multiplier to reduce the delta value on mouse move.