Download

How to make a clickable HUD button for mobile?? Please help!!

So we’re trying to make this first person shooter game and need the controls to be on screen rather than keyboard events. We checked the Tappy Chicken example but obviously having the whole HUD system built in components is not a good idea for an FPS game since we need to switch HUD elements on weapon change, etc. So is there any way to make a clickable button using the Draw function of HUD. Or is there an alternate way for the same?

A perfect reference for a game button examples in-game can be ‘Injustice: Gods Among Us’. They have all these buttons displayed on screen which are clickable. Please help!

It sounds like you want to create some image buttons or animated buttons. You could use the Content Examples (Menu Level) and see if you can reuse how that did that HUD. I know that some of the videos (weekly twitch recaps) that went over the new GUI system that Unreal Engine 4 got in 4.5 UMG: Here is a link to UMG’s starter documents.

I hope that helps you get started. Good luck.

Its a tutorial for menu but I used the same way to create buttons. Have a look.

Edit: Once you created your buttons in the widget BP, select a button and in the panel on the right press “event on clicked” it will open the graph and in it you will have a node. It will be your button event on clicked. Drag a line from it and type cast. Now you can cast for example, to your character. Then from the cast to character node, drag from the pin "as character and now you can get whatever you want your button to trigger (ex. Attack or jump).