This page shows how to get the interaction system running in your unreal engine 5 project.
Setting up the character (interactor)
Inside your character blueprint add the actor component UniversalInteractor (INTERACTOR, not interactable).
The Universal Interactor component has a couple of properties that allow for dynamic interaction against interactables, to check out all modifiable properties go to Interactor component.
Finally, setup an Input Action (Name it Interact or anything you want) and setup functions like this:
Started -> Begin Interact
Completed -> End Interact
Setting up the user interface
Open up the Content Drawer -> Right Click -> User Interface -> User Widget, name it WBP_HUD or something by preference.
If you have an existing HUD display in your project, you should use that one instead of creating a new one. Having multiple widgets on screen can reduce performance.
Place the WBP_InteractionWidget inside the HUD and anchor it to any position you want.
Inside your player controller, on begin play, create the HUD and add it to the viewport.
Setting up the interactable
Inside any actor blueprint that you want the player to interact with add UniversalInteractable (INTERACTABLE, not interactor).
The Universal Interactable component also has a couple of properties that allow for dynamic interaction, to check out all modifiable properties go to Interactable component.