Trying to move custom player pawn along axis left and right using Widget buttons.

You need a:

  • user widget that acts as a button
  • add those user widget buttons to the UI interface
  • add UI interface to the viewport

You are adding custom user widget buttons to the viewport directly instead. You skipped this part:

The UI should have those 2 custom buttons you made, here you can set their data. And add any other UI elements, healthbars and whatnots.


The general idea when working with UMG is to make small modular user widgets out of native elements (buttons, borders, progress bars) and add those to the Main UI which you bring up to the viewport.