Getting Started
Create your first interaction in 5 minutes!
Overview
This guide will walk you through:
- Adding InteractionComponent to your character (2 min)
- Making an object interactable (2 min)
- Creating a simple widget (1 min)
- Testing the interaction
Total time: ~5 minutes
Step 1: Player Setup (2 minutes)
Add InteractionComponent
- Open your Character Blueprint (e.g.,
BP_ThirdPersonCharacter) - Components Panel → Add → Search:
Interaction Component - Select the component
- 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
- 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
- Open your object Blueprint (e.g.,
BP_Door,BP_Chest) - Add Components:
Interactable ComponentWidget Component
Configure Interactable Component
- Select Interactable Component
- Details Panel → Interaction Data:
Basic Settings:
├─ Interaction Name: "Open Door" (or your action)
├─ Interaction Type: Instant
├─ Priority: 0
└─ Cooldown: 0.0
Configure Widget Component
- Select Widget Component
- 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)
- Content Browser → Right-Click → User Interface → Widget Blueprint
- Name:
WBP_InteractionPrompt - Open widget → Class Settings → Parent 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
- Go back to your object Blueprint
- Select Widget Component
- Widget Class →
WBP_InteractionPrompt
Step 4: Test It!
In Editor
- Play in Editor (PIE)
- Look at your interactable object
- You should see:
- Debug visualization (green/red line if enabled)
- Widget appears above object
- Press your interaction key (E)
- “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:
- Core Concepts - Understand how it works
Features:
- Interaction Types - Instant, Hold, Toggle explained
- Detection Methods - Choose the best method for your game
Help:
- Troubleshooting - Detailed solutions
- FAQ - Common questions answered