Main Menu with Gamepad

I am trying to create a main menu that allows the player to use the game pad to navigate.

I have a widget blueprint for the menu and a level blueprint to add the widget to the viewport. I need to find a way to have player input recognized by the widget blueprint is to have a tick event continuously check for “is input key down”. Is there a more elegant way for my widget blueprint to work off of gamepad input than this?

So far I want to be able to press ‘up’ and ‘down’ on on the game pad, the main menu items will have a small animation to indicate the selected items. Is there a way to put the animations into events and have them call from the level blueprint? ‘Cast to’ requires an object reference.

Thank you in advanced for any help.

Hello Nony42.

For the menu function part you can use this system Unreal Engine 4 UMG Using a Gamepad - new version see below - YouTube. To not let it check every tick you can create in project settings - > input -> action mapping an action with the buttons you want, then replace the tick with the action mapping event.

Thank you for the quick reply. I have watched that same video but was discouraged because the person in the video said that action mapping wasn’t possible in the widget blueprint. I was hoping that this was something that was added in an update, but after trying myself I believe that this is something that is still unavailable (unless I’m missing something). I was trying to create the desired animations into functions and then call them from the level blueprint, but have been failing because ‘Cast to’ requires an objects be assigned. There are no objects in the widget blueprint.

Create a gamemode and a PlayerController only for the main menu , fire the widget from playercontroller and store the ref. Now you can put any event in playercontroller and send to widget.

1 Like

Interesting. I don’t suppose you could show me an example of that setup? How would I have the event sent to the widget blueprint?

unreal framework rules!

08407e575b6a402e7954177a8cf7092e913c2583.jpeg

you can set/get any data in the widget.

I tried it and nothing happened. I also got this error message:

edit: I did further tests for the controller to ensure that it was not the problem (tested with simple string output to the console).

I see my mistake, I was not properly setting the Main Menu Ref. Now that I fixed it, I now realize I can go back to just using the level blueprint and don’t have to deal with the game mode and character controller.

Thank you very much!