Since version 3.40, you can use a browser as a gamepad. This is primarily intended for smartphones.
A minimal web server is started which returns the web page with the Gampad UI. In addition, a minimal websocket server is started which receives the input from the web controller.



First you need the Unreal Web Browser Plugin to display a QR-Code®. QR-Code® is a registered trademark of Denso Wave Incorporated. Please remember to always include this suffix when using the term QR-Code®. Otherwise there could be legal trouble.



Add the widget to your UI. The QR-Code® is displayed here.



Here's how you can implement it in Blueprints.


The web server and websocket server are started first. These are started with ports in the range from 8080 to 8090.
You must pass two html files as parameters. You can download them here.

The qcode.html file contains a Javascript QR-Code® framework with the MIT license. You can make customizations but be careful not to change the text variable. This will be replaced by the url of the server.

In addition to the UI, the ui.html file contains a Javascript framework for the analog sticks with the MIT license.
You must not change the websocketURL variable here. Otherwise you can change the UI as you wish. Add or remove buttons etc.. The file only serves as a template.

After starting the server, you can use the “Get QCode” function to get the content of the qcode.html including the customized “text” variable as a string. Load this string into the Unreal Browser. The “Load String” function needs a url. This does not have to be a real url, it should just look like one.

If you scan the code with a smartphone, you should see the ui.html and be able to use it as a gamepad. Rumble is only available on Android.
Remember to specify the directory with the .html files in the package settings.