Getting Started

Create your first interaction in 5 minutes!


Overview

This guide will walk you through:

  1. Adding InteractionComponent to your character (2 min)
  2. Making an object interactable (2 min)
  3. Creating a simple widget (1 min)
  4. Testing the interaction

Total time: ~5 minutes


Step 1: Player Setup (2 minutes)

Add InteractionComponent

  1. Open your Character Blueprint (e.g., BP_ThirdPersonCharacter)
  2. Components PanelAdd → Search: Interaction Component
  3. Select the component
  4. Details Panel → Configure:
Detection Settings:
├─ Detection Method: Line Trace (FPS) or Sphere Trace (Third-Person)
├─ Interaction Distance: 500
└─ Show Debug: ✅ True (for testing)

Setup Input Binding

  1. In Event Graph:
Input Action "Interact" (Pressed)
└─ Get Component (Interaction Component)
   └─ Start Interaction

Input Action "Interact" (Released)
└─ Get Component (Interaction Component)
   └─ Stop Interaction

Alternative for Enhanced Input:

IA_Interact (Triggered)
└─ Start Interaction

Step 2: Make Object Interactable (2 minutes)

Add Components to Object

  1. Open your object Blueprint (e.g., BP_Door, BP_Chest)
  2. Add Components:
    • Interactable Component
    • Widget Component

Configure Interactable Component

  1. Select Interactable Component
  2. Details PanelInteraction Data:
Basic Settings:
├─ Interaction Name: "Open Door" (or your action)
├─ Interaction Type: Instant
├─ Priority: 0
└─ Cooldown: 0.0

Configure Widget Component

  1. Select Widget Component
  2. Critical Settings:
User Interface:
├─ Widget Class: (Leave empty for now, we'll create it next)
├─ Draw Size: 400 x 150
└─ Pivot: 0.5, 0.5

Rendering:
├─ Space: World ⚠️ IMPORTANT!
└─ Blend Mode: Transparent

Visibility:
└─ Visible: ☑️ False (starts hidden)

Add Interaction Logic

In Event Graph:

Event OnInteract (from Interactable Component)
│
└─ Print String ("Door Opened!")
   OR
   Your custom logic (open door, etc.)

Step 3: Create Widget (1 minute)

Quick Version (Minimal Widget)

  1. Content BrowserRight-ClickUser InterfaceWidget Blueprint
  2. Name: WBP_InteractionPrompt
  3. Open widgetClass SettingsParent Class: InteractionWidget ⚠️

Design Simple UI

In Designer tab:

Canvas Panel
└─ Text Block
   ├─ Name: Text_ActionName ✅ Is Variable
   ├─ Font Size: 28
   ├─ Justification: Center
   └─ Text: "Interact"

Implement Event

In Graph tab:

Event OnInteractionAvailable (InteractionData)
│
├─ Break FInteractionData
└─ InteractionName → Set Text (Text_ActionName)

Assign Widget

  1. Go back to your object Blueprint
  2. Select Widget Component
  3. Widget ClassWBP_InteractionPrompt

Step 4: Test It!

In Editor

  1. Play in Editor (PIE)
  2. Look at your interactable object
  3. You should see:
    • Debug visualization (green/red line if enabled)
    • Widget appears above object
  4. Press your interaction key (E)
  5. “Door Opened!” should print to screen

Expected Behavior

Widget appears when looking at object ✅ Widget disappears when looking away ✅ OnInteract fires when pressing key ✅ Debug line shows green when targeting


Troubleshooting

Widget doesn’t appear?

Check:

  • [ ] Widget Component → Space = World
  • [ ] Widget Component → Visible = False
  • [ ] Widget Blueprint → Parent Class = InteractionWidget
  • [ ] InteractionData → InteractionName is set
  • [ ] Widget assigned to Widget Component

Quick Test:

// Force show widget for debugging
Widget Component → Set Visibility (True)

OnInteract doesn’t fire?

Check:

  • [ ] Object has collision enabled (BlockAll or QueryOnly)
  • [ ] InteractableComponent → bIsEnabled = True
  • [ ] Input binding is correct (Start Interaction on press)
  • [ ] Detection Distance is high enough (try 1000 for testing)

Debug:

Event OnInteract
└─ Print String ("INTERACTION TRIGGERED!")

Can’t see object?

Enable Debug:

  • InteractionComponent → Show Debug = True
  • Look at object
  • Should see green/red line

Next Steps

🎉 Congratulations! You have a working interaction system!

Learn More:

Basic:

Features:

Help:


← Back to Index | Core Concepts →