How to move widget with gamepad (or better ideas)

This is defeating me.

Here’s the breakdown: I want to a cursor I can move with my gamepad. I tried to control the mouse position with the controller and got nowhere. Below is my progress, or lack thereof. In “event begin play” I’ve created the widget. I add it to the viewport and try to make the controller work with it here.

Here’s why I’m doing this (in case I’m going about it the completely wrong way). I am currently spawning a particle system while the cursor resides inside the circle. As it stays in the circle it charges up the box (a magic system basically). I want to apply force to the cursor while it is inside the box in random directions, making the player concentrate to keep it in the circle. I want to move this completely to the gamepad. As a bonus, if I can get this working with my gamepad, I hope to use it for my menu system as well, very similar to Destiny’s menu system. Thanks for the help!

I know my gamepad stick cursor setup needs to have a “Viewport Set Mouse Position” node (From Rama’s amazing plugin, which adds tons of nodes to Blueprint, linked here: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums ) to be called almost any frame. (At least every frame I want to be able to move the cursor with the gamepad on at least, which could be axis events, a tick event, or a DrawHud event? I imagine? I’m just using tick.)

Mouse X and Mouse Y are just variable floats created to allow the cursor to travel the whole distance of the screen, rather than a -1 to 1 scale on the axis. By adding the axis value to it and running it through a clamp, it’s pretty easy to limit it to the screen space, and have it move around. (I’m guessing this is where your setup is missing something? I could be wrong.)

The Controller Mode bool is just so you can use the mouse if you want, and it’ll swap over. Still working on a better solution for using both, but the controller moves the cursor as long as the ControllerMode Gate is open. You could simply delete all that stuff and plug the tick event into the Viewport node if you don’t want to use both, or I’m sure later down the line I’ll find out you can just set that in options and not worry about checkign axis data against itself to see if anything is moving. /facepalm (The event BeginPlay code just checks viewport size, and puts the mouse there so it doesn’t default to the top left.)

Anyrate, I hope that answers, or helps answer, your question to some degree. I’m fairly new to all of this as well. The Rama plugin page (Linked again here: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums ) gave me the Viewport Set Mouse Position node, which has, for this, been an absolute godsend. There’s a pretty simple installation process explained on that page if that’s the route you end up choosing. Good luck!

I couldn’t get that to work. Perhaps my version of the engine is too new, or perhaps its because I’m on a mac, but it wouldn’t load the plugin.

I have successfully made a way to move a widget around with my gamepad, however I haven’t been able to figure out how to successfully trace from its location into world space to interact with anything in the game, nor how to check if its overlapping with other widgets. So… visually it works, but other than that its kinda a waste.

This moves the widget:

This is one of many unsuccessful traces:

I am having the same problem with my inventory and using a gamepad. I also tried to use Rama’s plugin but I don’t think it works on Macs. I am working on a work around for the inventory at this time but I will say it is a little cumbersome. I have a main menu set up that is pretty easy but it is just a test one but it works nonetheless.

If we can keep each other posted on our progress I think we may be able to help each other out. This is obviously something that a lot of people are having an issue with but no one seems to know much about solving it.

Best of luck to you and I will let you know what I come up with IF I can get it working myself. As for your particle system and cursor, I just hope that once we can figure this out that it will solve that problem also.

Yea a menu system will be next on my list. I would love to see what your solution is when you get it figured. SVR33 and myself are working on it a little over here

I could easily make the particle system work even if I only had the system to interact with other 2D widgets, I just haven’t made any progress on that end so I started working at it from this angle.