Left Mouse click event - how to use Gamepad to mimic

All
I was wondering how I can mimic the standard functionality of the left mouse click with an input from a Gamepad?
Example - I have created an Accept button and using the keyboard/Mouse I can move over the button and click using the left mouse to hit the button and it does the functionality.

I’ve had a look through the Inputs and there is no mouse inputs in there so I assume there is somewhere else to add the Gamepad element to mimic this.

Can someone point me in the right direction

Thanks

:slight_smile:

There’s a certain BP set up to have the controller read the UI and you would have set it up in the widget. I’m at work right now so I can’t send a screen shot. But if I can find the tutorial again I will link it. Have you tried connecting a controller to see if you can move around?

Hi
Yes I have my xbox controller connected and it moves the player perfectly - just cant get it to mimic the old left click of the mouse
Thanks for helping :slight_smile:

All sorted - Turns out it uses the A button which I had assigned to a different function DOH!!

Capture.jpg

Hi all

Check these settings in your custom PlayerController.

4 Likes

Its not work, i need make some especific configuration???

1 Like



It’s not the greatest solution, and is quite tedious depending on how much you have in your HUD, but this works for me at least. I found I needed to overlay my non-btn UMG elements that had click events with a transparent btn, that way you can use the OnHovered and Unhovered events to set a boolean. Then you can simple collapse all your click logic into a function, and call that from your pawn/character’s BP

Don’t forget to do this…
“Use Mouse for touch”

Do we have something to make this work in UE5.3?

Because, this doesnt anymore.

1 Like

Yeah I am having issues too. Selecting all the settings in Garth’s comment above gets my mouse cursor to highlight the buttons but the face button on my controller won’t click them. Anybody got any ideas?
UE 5.4