Skip to main content

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

  1. Open your PlayerController Blueprint.
  2. Add the component:
    • Add Component → ED Player Interaction Component (UEDPlayerInteractionComponent)
  3. In details, configure (optional):
    • DefaultTraceMethod
    • DirectInteractionTraceDistance
    • SphereTraceRange
    • autoInteractEnabled

2) Add the GameState component (required for foliage + some replication helpers)

  1. Open your GameState Blueprint (or create one).
  2. Add the component:
    • Add Component → ED Interaction Game State Component (UEDInteractionGameStateComponent)
  3. Ensure your GameMode uses this GameState.

3) Create an interactable actor

  1. Create a new Actor Blueprint (e.g. BP_Chest).
  2. Add the component:
    • Add Component → ED Interactable Component (UEDInteractableComponent)
  3. Set:
    • InteractableTag (GameplayTag)
    • WidgetSettings (Title/Description/FocusTag/WidgetClass)
    • OutlineSettings (optional)
    • InteractionSettings (method, duration, cooldown, etc.)

UEDInteractableComponent can use tagged scene components to compute center/widget locations and line-of-sight dimensions:

  • Add a SceneComponent and tag it: CenterComponent
  • Add a SceneComponent and tag it: WidgetHolderComponent
  • Optionally add multiple SceneComponent and 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 pressed
  • Interact(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::OnInteractionSuccessful
  • UEDInteractableComponent::OnInteractionDenied
  • UEDPlayerInteractionComponent local delegates (focus/denied/completed)

For quick results, bind Blueprint events to the interactable component delegates on your interactable actor.