A flexible, Blueprint-friendly interaction system. Detect nearby objects, select between them, and interact instantly or by holding, with UI events built in

OmniInteraction gives any actor the ability to find and use interactable objects around it. Add one component to your character, implement one interface on your objects, and you get detection, line-of-sight checks, a selectable list, hold-to-interact, and UI events.
OmniInteraction, restart the editor.Interaction System.Interactable.Interact, Get Interact Text, Get Interact Icon, Get Interaction Duration and Should Remove On Interact.Interact(Get Current Index) on press, Stop Interact on release, and Index Up / Down on scroll.Implement IInteractable on any actor. All functions are Blueprint Native Events, so you can implement them in Blueprint or override _Implementation in C++.
class AMyPickup : public AActor, public IInteractable
{
GENERATED_BODY()
public:
virtual void Interact_Implementation(AActor* Interactor) override;
virtual FString GetInteractText_Implementation() override { return TEXT("Pick up"); }
virtual float GetInteractionDuration_Implementation() override { return 0.0f; }
virtual bool ShouldRemoveOnInteract_Implementation() override { return true; }
};
Class: UInteractionSystem (Actor Component). Add it to the actor that does the interacting.
| Property | Default | Description |
|---|---|---|
InteractionRadius | 90.0 | Detection radius in Unreal units. Read/write in Blueprint. |
bWrapSelection | false | Selection loops from last to first (and back) when scrolling. |
bShowDebugRadius | false | Draws the detection sphere. Green when idle, red while holding. |
bShowDebugState | false | Prints selected index, item list and hold progress on screen. |
| Function | Type | Description |
|---|---|---|
Interact(Index) | Callable | Interacts with the item at Index. Instant items fire at once; hold items start the hold timer. |
StopInteract | Callable | Cancels the current hold and resets progress. Call on input release. |
IndexUp / IndexDown | Callable | Moves selection and fires highlight start/end. |
InteractAll(bOnlyInstant) | Callable | Interacts with every nearby item. Defaults to instant items only. |
ClearAllInteractables | Callable | Clears the list and cancels any hold. |
RegisterWidgetReference(Widget) | Callable | Links a created widget to the next item slot so it can be removed correctly later. |
GetHoldProgress | Pure | 0 to 1. Bind to a progress bar. |
GetCurrentIndex | Pure | Currently selected index. |
GetSelectedActor | Pure | The selected actor, or null. |
IsHoldInteractionAtIndex(Index) | Pure | True if the item needs a hold. |
GetUpdatedTextAtIndex(Index) | Pure | Current interact text for an item. |
GetDistanceToInteractable(Index) | Pure | Distance from owner to item. |
Bind these in Blueprint (Assign nodes) or in C++ with AddDynamic.
| Event | Parameters | Fires when |
|---|---|---|
OnItemEntered | ItemName, ItemIcon | A new interactable enters range and is visible. |
OnItemRemoved | WidgetRef, Index | An item leaves range or is consumed. Use it to destroy the widget. |
OnSelectionChanged | NewSelectedIndex | The selected index changes. |
OnUpdateInteractionText | Index, NewText | Every frame for each item, so dynamic text stays in sync. |
OnItemEntered. Create your entry widget (name + icon), add it to a Vertical Box.RegisterWidgetReference with that widget. Do this right after creating it, one widget per entered item.OnItemRemoved. Call Remove From Parent on WidgetRef.OnSelectionChanged to highlight the entry at NewSelectedIndex.OnUpdateInteractionText to refresh the label at Index.GetHoldProgress.bShowDebugState to see exactly what the system is tracking.Interactable, is inside the radius, and has collision that responds to the Visibility channel. Walls between you and the object will also block it.Interactor is simply the owner.GetInteractionDuration. Call Interact on press and Stop Interact on release.