Quickstart

_images/dynamic_controller_tile.gif

Installation

Either install the plugin to your engine (via Epic Games Launcher) or directly into your project’s Plugins/ folder.

Important

ControllerHawk is maintained on Unreal 5.3. While the code can be made to compile on earlier engine versions, the assets are saved on Unreal 5.3 and cannot by default be backported easily to earlier engine versions.

At startup make sure to enable the plugin.

Adding a Controller Overlay

Adding a controller overlay to your game is pretty straightforward: construct a UI_DebugControllerOverlay and add it to the screen.

_images/overview_add_overlay.png

Add an overlay by constructing UI_DebugControllerOverlay and then calling AddToViewport() with the ZOrder set to a value appropriate for your HUD. You can do this in the BeginPlay of your player controller / character / or pawn.

You can customize this by creating a copy of the widget or creating your own to set position an opacity as desired.

_images/overview_example_overlay.png

UI_DebugControllerOverlay: An example overlay that places a UI_DynamicControllerTile at the bottom right of the screen (within a Canvas Panel).

Tip

For my own projects I have the Controller overlay turn on an off using a Debug Menu and/or a CVar. This means you can opt into having the controller overlay on as desired.

Sample Project

Example project (UE 5.3+) can be downloaded here. Install ControllerHawk into the Plugins/ folder of the project. Once opened, hit Play and you should see the controller overlay as shown below.

_images/example_project_image.png

Using the Controller Debugger

Right-click on /ControllerHawk/Utilities/EUW_ControllerDebugger and select Run Editor Utility Widget. This will open up the Controller Debugger.

_images/sys_tool_EUW_ControllerDebugger.png

The Controller Debugger with an XBox and PS5 controller attached to the current machine.

As you press inputs and attach and detach controllers, you should see them appear (assuming you have compatible runtime drivers for your device).

Supported Controllers

SEE: Supported Controllers

Controller Icons

ControllerHawk comes with textures and assets from Kenney’s Input Prompts package (https://kenney.nl/assets/input-prompts). These include glyphs for Xbox, PlayStation, and Switch controllers.

_images/quickstart_button_icons.png

For CommonUI, there are data assets (of type UCommonControllerBaseInputData) that you can use to auto-populate parts of your user interface with controller button icons. The following are available:

  • Keyboard and Mouse: /ControllerHawk/ControllerData/Hawk_Keyboard_ControllerData

  • Xbox / XInput devices: /ControllerHawk/ControllerData/Hawk_XInput_ControllerData

To use these assets, update your Game - Common Input Settings under Input > Platform Input > (Your Platform) > Default > Controller Data.

_images/quickstart_commonui.png