Quick Start (Blueprint)
This walkthrough sets up:
- A PlayerController with
UEDPlayerInteractionComponent - A GameState with
UEDInteractionGameStateComponent - A simple interactable actor with
UEDInteractableComponent
1) Add the Player Interaction component
- Open your
PlayerControllerBlueprint. - Add the component:
- Add Component → ED Player Interaction Component (
UEDPlayerInteractionComponent)
- Add Component → ED Player Interaction Component (
- In details, configure (optional):
DefaultTraceMethodDirectInteractionTraceDistanceSphereTraceRangeautoInteractEnabled
2) Add the GameState component (required for foliage + some replication helpers)
- Open your
GameStateBlueprint (or create one). - Add the component:
- Add Component → ED Interaction Game State Component (
UEDInteractionGameStateComponent)
- Add Component → ED Interaction Game State Component (
- Ensure your GameMode uses this GameState.
3) Create an interactable actor
- Create a new Actor Blueprint (e.g.
BP_Chest). - Add the component:
- Add Component → ED Interactable Component (
UEDInteractableComponent)
- Add Component → ED Interactable Component (
- Set:
InteractableTag(GameplayTag)WidgetSettings(Title/Description/FocusTag/WidgetClass)OutlineSettings(optional)InteractionSettings(method, duration, cooldown, etc.)
4) Add required helper scene components (recommended)
UEDInteractableComponent can use tagged scene components to compute center/widget locations and line-of-sight dimensions:
- Add a
SceneComponentand tag it:CenterComponent - Add a
SceneComponentand tag it:WidgetHolderComponent - Optionally add multiple
SceneComponentand tag them:DimensionComponent(used for LoS checks)
If you do not add these components, the system falls back to actor location in some paths, but you get better results with explicit points.
5) Bind the Interact input
EDInteractionSystem exposes Interact(bool bEntering) on the PlayerInteraction component. You usually call:
Interact(true)on input pressedInteract(false)on input released
You can bind it via:
- Legacy Input (Project Settings → Input)
- Enhanced Input (recommended)
6) Listen for interaction events
You can react to interactions using:
UEDInteractableComponent::OnInteractionSuccessfulUEDInteractableComponent::OnInteractionDeniedUEDPlayerInteractionComponentlocal delegates (focus/denied/completed)
For quick results, bind Blueprint events to the interactable component delegates on your interactable actor.