Skip to main content

πŸ–οΈ Interactable Objects

Games come alive when the world responds to players. Pressing a button to open a door, picking up a health pack, flipping a switch to activate a bridgeβ€”these interactions transform a static environment into a living world. In this lesson, you'll learn how to create objects that respond to player input, combining line traces for detection with input actions for activation. By the end, you'll have a complete interaction system ready for any game.

🎯 Learning Objectives

By the end of this lesson, you will be able to:

  • Implement line traces to detect interactable objects
  • Create a reusable interaction interface
  • Build interactable doors, switches, and pickups
  • Display interaction prompts to the player
  • Combine collision, input, and visual feedback for polished interactions

Estimated Time: 55-65 minutes

Prerequisites: Lesson 6.4 (Collision and Physics Interaction), Lesson 6.2 (Enhanced Input System)

πŸ“‘ In This Lesson

Interaction System Overview

An interaction system answers two questions: "What can the player interact with?" and "What happens when they do?" Different games answer these questions differently, but most interaction systems share common components.

Types of Interaction

Proximity-Based (Automatic): Interaction happens automatically when the player gets close. Triggers from the previous lesson handle thisβ€”walking through a door opens it, stepping on a platform activates it.

Input-Based (Manual): Interaction requires a button press. The player must be near an object AND press a key. This is what we'll focus on in this lessonβ€”"Press E to interact" style systems.

Hybrid: Some objects use both. A door might open automatically when you approach, but a chest requires pressing a button to open.

Components of an Interaction System

A complete interaction system typically includes:

Detection: Determining what the player can interact with. This can use overlap triggers (radius around player), line traces (what you're looking at), or both.

Identification: Recognizing that an object is interactable and what kind of interaction it supports. Interfaces or tags help with this.

Feedback: Showing the player they can interact. UI prompts ("Press E to Open"), object highlights, crosshair changes.

Execution: Actually performing the interaction when the player presses the button. Each object handles its own logic.

Interaction System Components πŸ” Detection Line Trace or Overlap Check "What's in range?" 🏷️ Identification Interface Check or Tag Verification "Is it interactable?" πŸ’¬ Feedback UI Prompt Object Highlight "Press E to Open" ⚑ Execute On Input Pressed "Do the thing" Player Door [E] Open Door

Figure: The four components of a typical interaction system.

Our Approach

In this lesson, we'll build an interaction system that:

  1. Uses a line trace from the camera to detect what the player is looking at
  2. Checks if the hit object implements an interaction interface
  3. Shows a UI prompt when an interactable is detected
  4. Calls the object's Interact function when the player presses E

This approach is flexible, scalable, and used in many professional games.

πŸ’‘ Why Line Traces?

Line traces let the player interact with what they're looking at, not just what's nearby. This is more intuitiveβ€”you point at a door and press E, rather than bumping into it. It also allows interaction at a distance (picking up items from across the room) if desired.

Line Traces for Detection

A line trace (also called a raycast) shoots an invisible line from one point to another and reports what it hits. It's the most common way to detect what the player is looking at or aiming at.

Line Trace Basics

A line trace needs:

  • Start Point: Where the line begins (usually camera location)
  • End Point: Where the line ends (camera location + forward direction Γ— distance)
  • Trace Channel: What types of objects to hit (Visibility, Camera, custom channels)
  • Ignored Actors: Actors to skip (usually the player themselves)

The trace returns a Hit Result containing information about what was hit: the actor, component, location, normal, and more.

Line Trace by Channel

The most common node is Line Trace By Channel:

  1. In Blueprint, right-click and search "Line Trace By Channel"
  2. Connect Start and End vectors
  3. Select Trace Channel (usually Visibility)
  4. The node outputs a boolean (hit something?) and a Hit Result struct
Line Trace Visualization πŸ“· Start Point Camera Location Door Hit! End Point (if no hit) Trace Distance Beyond hit Hit Result Actor: BP_Door Location: (450, 0, 120) Normal: (-1, 0, 0)

Figure: Line trace from camera stops at first blocking object and returns hit information.

Setting Up the Trace in Character

We'll add the interaction trace to the player character, running every frame (or every few frames for performance):

Get Start Point:

  1. Get the player camera's location: Get Player Camera Manager β†’ Get Camera Location
  2. Or use the character's camera component if you have one

Get End Point:

  1. Get camera forward vector: Get Camera Rotation β†’ Get Forward Vector
  2. Multiply by trace distance (e.g., 300 units)
  3. Add to start point: Start + (Forward Γ— Distance)

Perform the Trace:

  1. Add Line Trace By Channel
  2. Connect Start and End
  3. Set Trace Channel to Visibility
  4. Add Self to Actors to Ignore array
Interaction Trace Setup (Simplified) Event Tick Get Camera Location + Forward Γ— 300 β†’ Start, End Line Trace By Channel Channel: Visibility Ignore: Self Hit? Check Interface Show Prompt Hide Prompt Clear Target Run every tick (or use timer for performance)

Figure: Basic interaction trace running on Event Tick.

Extracting Hit Information

When the trace hits something, extract information from the Hit Result:

  1. Break Hit Result β€” Splits the struct into individual values
  2. Hit Actor β€” The actor that was hit (use this to check for interface)
  3. Hit Component β€” The specific component hit
  4. Impact Point β€” World location of the hit
  5. Impact Normal β€” Surface direction at hit point

Optimizing the Trace

Running a trace every frame works but can be optimized:

Use a Timer: Instead of Event Tick, use a timer that fires every 0.1 seconds. Still responsive but fewer traces.

Trace on Input: Only trace when the player presses the interact key, not continuously. Simpler but no preview prompt.

Short Distance: Keep trace distance reasonable (200-400 units). Longer traces have minimal benefit for interaction.

⚠️ Debug Visualization

The Line Trace node has a "Draw Debug Type" parameter. Set it to "For Duration" during development to see the trace line in-game. Remember to set it back to "None" for the final build!

The Interaction Interface Pattern

When your trace hits an object, how do you know it's interactable? You could check the actor's class, but that gets messy with many interactable types. The cleaner solution is a Blueprint Interface.

What is a Blueprint Interface?

A Blueprint Interface defines a contractβ€”a set of functions that any Blueprint can implement. It's like saying "any actor that implements BPI_Interactable promises to have an Interact function."

Benefits of interfaces:

  • Decoupling: The player doesn't need to know about every interactable class
  • Flexibility: Any actor can be interactable by implementing the interface
  • Consistency: All interactables have the same function signature
  • Easy checking: "Does this actor implement BPI_Interactable?" is a simple yes/no
Blueprint Interface Pattern BPI_Interactable Interact(Actor Caller) GetInteractionText() β†’ String implements BP_Door Interact β†’ Open/Close Text β†’ "Open Door" BP_Pickup Interact β†’ Collect Text β†’ "Pick Up" BP_Switch Interact β†’ Toggle Text β†’ "Flip Switch"

Figure: One interface, many implementations. Each object handles Interact differently.

Creating the Interface

  1. In Content Browser, right-click β†’ Blueprints β†’ Blueprint Interface
  2. Name it BPI_Interactable
  3. Double-click to open

In the Interface Editor, add functions:

Add Interact Function:

  1. In the Functions panel, there's a default "NewFunction" β€” rename it to Interact
  2. Select the function and add an input parameter:
    • Name: Caller
    • Type: Actor (object reference)
  3. This lets the interactable know WHO is interacting (useful for player-specific logic)

Add GetInteractionText Function:

  1. Click + Add Function in the Functions panel
  2. Name it GetInteractionText
  3. Add an output parameter:
    • Name: Text
    • Type: String
  4. This returns the prompt text ("Open Door", "Pick Up", etc.)

Compile and save the interface.

BPI_Interactable Interface Definition BPI_Interactable (Blueprint Interface) πŸ”§ Interact Input: Caller (Actor) πŸ”§ GetInteractionText Output: Text (String) Interface defines the contract β€” implementations provide the behavior

Figure: BPI_Interactable with two functions: Interact and GetInteractionText.

Implementing the Interface

To make an actor interactable:

  1. Open the actor's Blueprint
  2. Go to Class Settings (toolbar)
  3. In Details panel, find Interfaces β†’ Implemented Interfaces
  4. Click Add and select BPI_Interactable
  5. Compile β€” new events appear in the Event Graph

Now implement the functions:

Implement Interact:

  1. In My Blueprint panel, under Interfaces, find Interact
  2. Double-click or right-click β†’ Implement Event
  3. An event node appears β€” add your interaction logic after it

Implement GetInteractionText:

  1. Find GetInteractionText under Interfaces
  2. Implement it β€” this is a function, not an event
  3. Add a Return node with your text string

Checking for Interface in Player

Back in the player character, after the line trace hits something:

  1. Get the Hit Actor from the trace result
  2. Use Does Implement Interface node
  3. Select BPI_Interactable
  4. Branch on the result

If true, call GetInteractionText on the actor to get the prompt, and store the actor reference for when the player presses the interact key.

flowchart TD
    A["Line Trace Hit"] --> B["Get Hit Actor"]
    B --> C{"Does Implement
BPI_Interactable?"} C -->|"Yes"| D["Store as Current Target"] D --> E["Call GetInteractionText"] E --> F["Show UI Prompt"] C -->|"No"| G["Clear Current Target"] G --> H["Hide UI Prompt"] style A fill:#4CAF50,color:#fff style C fill:#667eea,color:#fff style F fill:#FF9800,color:#fff style H fill:#607D8B,color:#fff

Figure: Flow for checking if a hit actor is interactable.

Calling Interact on Input

When the player presses the interact key (E):

  1. Check if we have a valid Current Target (from the trace)
  2. If yes, call Interact interface message on that actor
  3. Pass Self (the player) as the Caller parameter

Use Interact (Message) node, not a direct function call. Messages work on any actor implementing the interface without needing to know the specific class.

βœ… Interface Message vs. Function Call

When calling interface functions, use the Message version (shows with an envelope icon). It safely handles the call even if the target doesn't implement the interface, returning nothing instead of crashing. Direct interface calls require casting first.

Creating Interactable Objects

Now that we have an interaction system framework, let's create some actual interactable objects. Each object implements the BPI_Interactable interface and handles its own behavior when Interact is called.

Interactable Door

An interactive door opens or closes when the player interacts with it. We'll use a timeline to animate the rotation smoothly.

Create the Door Blueprint:

  1. Right-click in Content Browser β†’ Blueprint Class β†’ Actor
  2. Name it BP_InteractableDoor
  3. Open and add components:
    • Scene (root) β€” acts as the pivot point
    • Static Mesh (child of Scene) β€” the door mesh
    • Box Collision (child of root) β€” for blocking

Set up the mesh:

  1. Select the Static Mesh component
  2. Assign a door mesh (or use a scaled cube: 100Γ—10Γ—200)
  3. Offset the mesh so the pivot (Scene root) is at the hinge edge
  4. For a door 100 units wide, offset X by 50 so the left edge aligns with the pivot

Implement the Interface:

  1. Class Settings β†’ Add BPI_Interactable
  2. Compile
  3. Implement GetInteractionText: Return "Open Door" or "Close Door" based on state
  4. Implement Interact event: Toggle between open and closed

Create the open/close animation:

  1. Create a variable IsOpen (Boolean, default False)
  2. Add a Timeline named "DoorTimeline"
  3. In the timeline, add a Float track named "Alpha" (0 to 1 over 0.5 seconds)
  4. Use Lerp (Rotator) to interpolate between closed (0, 0, 0) and open (0, 90, 0)
  5. Set the Scene component's relative rotation
BP_InteractableDoor Structure Components πŸ“¦ Scene (Root/Pivot) β”œβ”€ πŸšͺ DoorMesh └─ πŸ“ BoxCollision Pivot at hinge edge Variables πŸ”˜ IsOpen (Bool) πŸ”’ OpenAngle (Float) Default: 90 Interface: BPI_Interactable Interact β†’ Toggle IsOpen, Play Timeline GetInteractionText β†’ IsOpen ? "Close" : "Open" Door Timeline 0s 0.5s 90Β° 0Β°

Figure: Door Blueprint with components, variables, and animation timeline.

Interactable Pickup

A pickup item that the player collects (health, ammo, coins). When interacted with, it adds to the player's inventory and destroys itself.

Create the Pickup Blueprint:

  1. Create new Actor Blueprint: BP_InteractablePickup
  2. Add components:
    • Static Mesh β€” the item visual
    • Sphere Collision β€” for proximity detection (optional)
    • Point Light β€” glow effect (optional)

Variables:

  1. ItemName (String) β€” "Health Pack", "Gold Coin", etc.
  2. ItemValue (Integer) β€” Amount to give (25 health, 100 gold)
  3. Make these Instance Editable so each pickup can be configured in the level

Implement Interface:

  • GetInteractionText: Return "Pick up " + ItemName
  • Interact:
    1. Cast Caller to your character class
    2. Call a function on character to add item (e.g., AddHealth, AddGold)
    3. Play pickup sound
    4. Destroy Actor (self)
Common Pickup Types ❀️ Health Pack +25 Health πŸ”« Ammo Box +30 Bullets πŸͺ™ Gold Coin +100 Gold πŸ”‘ Key Unlocks doors

Figure: Different pickup types use the same base system with different values.

Interactable Switch

A switch that toggles something else in the levelβ€”a light, a door, a platform. Switches demonstrate how interactables can affect other actors.

Create the Switch Blueprint:

  1. Create BP_InteractableSwitch
  2. Add components:
    • Static Mesh β€” switch/lever visual
    • Point Light β€” indicator (red/green)

Variables:

  1. IsActivated (Boolean) β€” Current state
  2. LinkedActors (Array of Actors) β€” Things to toggle
  3. Make LinkedActors Instance Editable for level design

Implement Interface:

  • GetInteractionText: Return "Activate" or "Deactivate" based on state
  • Interact:
    1. Toggle IsActivated
    2. Update indicator light color
    3. Loop through LinkedActors and call their activation function

Actor Communication: Event Dispatchers

How does a switch tell a door to open? Several approaches:

Direct Reference: The switch has a reference to specific actors and calls functions on them. Simple but tightly coupled.

Interface: Create a BPI_Activatable interface with Activate/Deactivate functions. Linked actors implement it.

Event Dispatcher: The switch broadcasts an event. Any actor can bind to it and respond. Most flexible.

For simple cases, direct reference works fine. We'll use that approach in the hands-on exercise.

flowchart LR
    S["BP_Switch"] -->|"Interact"| T["Toggle State"]
    T --> L["Loop LinkedActors"]
    L --> D1["Door 1
Open/Close"] L --> D2["Light 1
On/Off"] L --> D3["Platform
Move"] style S fill:#9C27B0,color:#fff style T fill:#667eea,color:#fff style D1 fill:#4CAF50,color:#fff style D2 fill:#FF9800,color:#fff style D3 fill:#2196F3,color:#fff

Figure: A switch can control multiple linked actors.

Adding Visual Feedback

Great interactions include visual feedback:

Highlight Effect:

  • Enable "Render Custom Depth" on the mesh when targeted
  • Use a post-process material to create outline effect
  • Or simply change material/emissive when targeted

UI Prompt:

  • Create a Widget Blueprint with text ("Press E to Open")
  • Add Widget Component to interactables, or
  • Display a single HUD widget that updates based on current target

Interaction Feedback:

  • Play sound effect on interact
  • Spawn particle effect
  • Brief UI flash or icon
Interaction Feedback Not Targeted Door Target Targeted Door [E] Open Door Interact Interacted πŸ”Š Sound + Animation

Figure: Visual feedback progresses from normal β†’ targeted β†’ interacted.

πŸ’‘ Reusable Base Class

For games with many interactables, create a base class BP_InteractableBase that implements the interface and common functionality (highlight, sound). Then create child classes (BP_Door, BP_Pickup) that override specific behavior. This reduces duplicate code.

Hands-On: Build an Interactive Door

Let's build a complete interactive door system from scratch. We'll create the interface, the door Blueprint, the interaction detection in the character, and a simple UI prompt.

🎯 Exercise Goal

Create a door that: shows "Press E to Open/Close" when the player looks at it, opens with smooth animation when interacted, and closes when interacted again. This demonstrates the complete interaction workflow.

Step 1: Create the Interface

  1. Content Browser β†’ Right-click β†’ Blueprints β†’ Blueprint Interface
  2. Name it BPI_Interactable
  3. Double-click to open

Add Interact function:

  1. Rename the default function to Interact
  2. Add input: Caller (Actor Reference)

Add GetInteractionText function:

  1. Click + Add Function
  2. Name it GetInteractionText
  3. Add output: Text (String)

Compile and save.

Step 2: Create the Door Blueprint

  1. Right-click β†’ Blueprint Class β†’ Actor
  2. Name it BP_InteractableDoor
  3. Open it

Add Components:

  1. Add Scene component β€” name it "Pivot" (this will be root)
  2. Make Pivot the root by dragging it onto DefaultSceneRoot
  3. Add Static Mesh as child of Pivot β€” name it "DoorMesh"
  4. Set DoorMesh's Static Mesh to Shape_Cube
  5. Scale DoorMesh to (1, 0.1, 2) for a door-like shape
  6. Set DoorMesh's Location to (50, 0, 100) β€” offset so pivot is at edge

Add Variables:

  1. IsOpen (Boolean) β€” Default: False
  2. OpenAngle (Float) β€” Default: 90, Instance Editable

Implement Interface:

  1. Click Class Settings in toolbar
  2. In Details β†’ Interfaces β†’ Add BPI_Interactable
  3. Compile

Step 3: Implement GetInteractionText

  1. In My Blueprint panel, find Interfaces β†’ GetInteractionText
  2. Double-click to create the function graph
  3. Add a Select node (String)
  4. Connect IsOpen to the Index
  5. Set False option to "Open Door"
  6. Set True option to "Close Door"
  7. Connect Select output to Return Node's Text input

Step 4: Create Door Timeline

  1. In Event Graph, right-click β†’ Add Timeline
  2. Name it "DoorTimeline"
  3. Double-click to open timeline editor
  4. Click + Track β†’ Add Float Track
  5. Name the track "DoorAlpha"
  6. Add keyframes:
    • Time 0, Value 0
    • Time 0.5, Value 1
  7. Set Length to 0.5
  8. Close timeline editor

Step 5: Implement Interact Event

  1. In My Blueprint β†’ Interfaces, right-click Interact β†’ Implement Event
  2. From the Interact event:
    • Add a Branch node
    • Connect IsOpen to condition
  3. If False (door is closed):
    • Set IsOpen to True
    • DoorTimeline β†’ Play from Start
  4. If True (door is open):
    • Set IsOpen to False
    • DoorTimeline β†’ Reverse from End

Step 6: Animate Door Rotation

  1. From DoorTimeline's Update output:
  2. Add Lerp (Rotator) node
  3. A: Make Rotator (0, 0, 0) β€” closed position
  4. B: Make Rotator (0, OpenAngle, 0) β€” open position
  5. Alpha: Connect to DoorAlpha output from timeline
  6. Drag Pivot component into graph
  7. From Pivot, add Set Relative Rotation
  8. Connect Lerp output to New Rotation
Door Interact Logic Interact (Event) IsOpen? Open Door Set IsOpen = True Play from Start F Close Door Set IsOpen = False Reverse from End T Timeline Update Lerp Rotation 0Β° ↔ OpenAngleΒ° Set Relative Rotation (Pivot Component) Door smoothly rotates between closed (0Β°) and open (OpenAngleΒ°)

Figure: Interact toggles the timeline direction; timeline drives rotation.

Step 7: Add Interaction to Character

Open your character Blueprint and add:

Variables:

  1. CurrentInteractable (Actor Reference) β€” Stores what we're looking at
  2. InteractionDistance (Float) β€” Default: 300

Create Interaction Trace Function:

  1. Create a new function CheckForInteractable
  2. Get camera location and rotation (Get Player Camera Manager β†’ Get Camera Location/Rotation)
  3. Calculate end point: Location + (Forward Vector Γ— InteractionDistance)
  4. Line Trace By Channel (Visibility)
  5. If hit:
    • Get Hit Actor
    • Does Implement Interface (BPI_Interactable)?
    • If yes: Set CurrentInteractable = Hit Actor
    • If no: Set CurrentInteractable = None
  6. If no hit: Set CurrentInteractable = None

Call on Tick:

  1. Event Tick β†’ Call CheckForInteractable

Handle Interact Input:

  1. Create Input Action IA_Interact (Digital)
  2. Map to E key in your Mapping Context
  3. Add EnhancedInputAction IA_Interact event
  4. Check if CurrentInteractable is valid
  5. If valid: Call Interact (Message) on CurrentInteractable, pass Self as Caller

Step 8: Add Simple UI Prompt

Create a basic text widget:

  1. Right-click β†’ User Interface β†’ Widget Blueprint
  2. Name it WBP_InteractionPrompt
  3. Add a Text Block centered on screen
  4. Bind text to a variable or function

In Character:

  1. Create widget on BeginPlay, add to viewport, store reference
  2. In CheckForInteractable, when CurrentInteractable changes:
    • If valid: Get Interaction Text, set widget text, show widget
    • If none: Hide widget

Step 9: Test

  1. Place BP_InteractableDoor in your level
  2. Play the game
  3. Look at the door β€” prompt should appear
  4. Press E β€” door should open
  5. Press E again β€” door should close
  6. Look away β€” prompt should disappear

βœ… Exercise Complete!

You've built a complete interaction system with:

  • Blueprint Interface for consistent interaction API
  • Line trace detection for "look at" targeting
  • Animated door with timeline-driven rotation
  • Input handling for the interact key
  • UI feedback showing interaction prompts

This same pattern works for any interactable objectβ€”just implement the interface!

Bonus Challenges

  1. Locked Door: Add a IsLocked variable. If locked, GetInteractionText returns "Locked", Interact does nothing or plays error sound
  2. Key Required: Check if player has key item before unlocking
  3. Sound Effects: Play door open/close sounds using Play Sound at Location
  4. Auto-Close: Add a timer that closes the door after a few seconds
  5. Pickup Item: Create BP_InteractablePickup that destroys itself and adds health to player

Summary

In this lesson, you've built a complete interaction systemβ€”the foundation for player engagement with the game world. From detecting what the player is looking at to responding with custom behaviors, you now understand how to make any object interactive.

Key Concepts

Interaction System Components: Detection (what can be interacted with), Identification (is it interactable?), Feedback (UI prompts, highlights), and Execution (the actual interaction logic). These four components work together to create polished interactions.

Line Traces: Invisible rays that detect what the player is looking at. Start from the camera, extend forward, and return hit information. Line Trace By Channel uses collision channels to filter what can be hit.

Blueprint Interfaces: Contracts that define what functions an actor must implement. BPI_Interactable with Interact and GetInteractionText functions allows any actor to be interactable without the player needing to know specific classes.

Interface Messages: Safe way to call interface functions on actors. Use "Interact (Message)" rather than direct callsβ€”it handles cases where the target doesn't implement the interface gracefully.

Interactable Objects: Doors use timelines for smooth rotation. Pickups collect items and destroy themselves. Switches toggle other actors in the level. All implement the same interface but handle Interact differently.

Visual Feedback: UI prompts show what can be interacted with and how. Object highlights indicate the current target. Sound and visual effects confirm successful interaction.

Interaction System Quick Reference

Component Implementation Purpose
Detection Line Trace By Channel Find what player looks at
Identification Does Implement Interface Check if interactable
Feedback Widget + GetInteractionText Show prompt to player
Execution Interact (Message) Trigger the interaction

Best Practices

  • Use interfaces: They decouple the player from interactable classes, making the system flexible and maintainable
  • Store current target: Keep a reference to what the player is looking at for use when they press interact
  • Provide clear feedback: Always show the player what they can interact with and what will happen
  • Use timelines for animation: Smooth movement looks more polished than instant changes
  • Make variables editable: Instance Editable variables let designers configure objects in the level
  • Consider a base class: For many interactables, a parent class with common functionality reduces duplication
  • Add sound: Audio feedback makes interactions feel responsive and satisfying
Complete Interaction Flow Player Line Trace Door BPI_Interactable Interface? Get Text Show Prompt Press E Call Interact() Door Opens! Detect Identify Input Execute

Figure: The complete interaction flow from detection to execution.

Module 6 Complete!

Congratulations! You've completed Module 6: Player Interaction and Input. You now understand:

  • Player Controllers and Pawns: The architecture of player representation
  • Enhanced Input System: Modern, flexible input handling with actions, contexts, and modifiers
  • Character Movement: The Character Movement Component and how to tune it for different gameplay feels
  • Collision and Physics: Collision channels, responses, triggers, and physics simulation
  • Interactable Objects: Interface-based interaction systems with visual feedback

These systems form the core of player agency in games. In Module 7, you'll learn about User Interface with UMGβ€”creating menus, HUDs, and in-game UI to communicate information to players.

Knowledge Check

Question 1

What is the primary purpose of using a Blueprint Interface for interactable objects?

Correct answer: B β€” Blueprint Interfaces define a contract that any actor can implement. The player character only needs to check "Does this implement BPI_Interactable?" rather than casting to specific classes like BP_Door, BP_Pickup, etc. This decouples the interaction system from specific implementations.

Question 2

What does a Line Trace By Channel return when it hits an object?

Correct answer: B β€” Line Trace By Channel returns both a boolean (was something hit?) and a Hit Result struct containing detailed information: the hit actor, hit component, impact point, impact normal, physical material, bone name (for skeletal meshes), and more.

Question 3

Why should you use "Interact (Message)" instead of calling the interface function directly?

Correct answer: C β€” Interface Messages (shown with an envelope icon) safely call interface functions on any actor. If the target doesn't implement the interface, the message simply does nothing instead of causing an error. Direct interface calls require you to cast first and handle the failure case manually.

Question 4

What is the recommended way to animate a door opening smoothly?

Correct answer: C β€” Timelines provide smooth, controlled animation with easy-to-edit curves. They output an alpha value (0-1) that you use with Lerp to interpolate between closed and open states. Timelines can also be played forward or reversed, making toggle behavior simple.

Question 5

Which component of an interaction system is responsible for showing "Press E to Open" on screen?

Correct answer: C β€” Feedback is responsible for communicating to the player what they can interact with. This includes UI prompts (text showing the action), object highlights (visual indication of the target), and interaction confirmations (sounds, effects when interacting).