By Yibei He, Peter Brinson, and George Zou
0. Introduction
Learning Objectives:
- Build a reusable
BP_Interactable_BaseActor Blueprint with a mesh and trigger radius - Create an
InteractionComponent(Actor Component) to separate interaction logic from the player - Use a looping Sphere Trace to detect what the player is looking at
- Build hover effects including a Widget UI that appears when the player looks at an object
- Bind an interaction event to the E key
This tutorial starts from a new project. Tutorial 822 continues in the same project, so keep it once you’re done.
Chapter 0: Start a First Person Project
0.1 Choose the Template
Open Unreal Engine. In the Project Browser, choose Games, then the First Person template.
Under Project Defaults, choose Blueprint, not C++.

0.2 Name and Verify
Name the project then Click Create.
Use this project for Tutorial 822 as well. Everything 822 builds sits on top of what you make here.
Once the project opens, press Play. You should be walking around the template level in first person. Press Esc to stop.
0.3 Find the Player Character
In the Content Browser, open FirstPerson → Blueprints. BP_FirstPersonCharacter is the player. In A2 you’ll add the interaction logic to it as a component.
Chapter A: Create the Interactable Item System
A0. Create a Blueprint with Mesh & Trigger Area
Right-click in the Content Browser, create a Blueprint, choose Actor, and rename it BP_Interactable_Base.

Double-click to open it. In Components, add a Static Mesh component and rename it Mesh_Interactable.

In Details, change the mesh to a cube.

Add a Sphere Collision component. Name it and parent it as shown. In Details, adjust the Sphere Radius to define the area where players can interact with this object.

Click on BP_Interactable_Base in the Components panel and add the tag Interactable.

A1. Setup Interact Overlap
Right-click on the collision component (InteractRadius) and add:

Drag from each event node and search for Cast to BP_FirstPersonCharacter. Note the parameters flowing left to right.

A2. Create Interaction Component
Create a new Blueprint and choose Actor Component. Name it “Interaction Component”.

Add it to BP_FirstPersonCharacter (in FirstPerson → Blueprints, from step 0.3). Keeping interaction logic in a dedicated component makes it easy to disable (by basically removing the component).

A3. Call Overlap Event
Open InteractionComponent. Right-click to Add Custom Event, rename it On Interactable Overlap. In Details, add an input: bIsOverlapped (Boolean).

Back in BP_Interactable_Base: from Other Actor, drag out a Get Component by Class node and select InteractionComponent.

Call the event we just created: On Interactable Overlap.

For On Component End Overlap, do the same but uncheck Is Overlapped.

Back in the Interactable Blueprint, add Branch and Print String nodes to test as follows.

Test it: position the actor and player so the player starts outside the radius, then walk into and outside of the radius and see the print statements.

A4. Setup the Line Trace Logic
In InteractionComponent:
Add a Custom Event, rename it Draw Trace, add a Boolean input bIsDrawTrace.

Add another Custom Event, rename it Detect Sight.

Branch the Draw Trace event and connect to Set Timer by Function Name, passing Detect Sight as the function name. Set Time to 0.1, check Looping. This calls Detect Sight every 0.1 seconds until stopped.

Promote the Return Value to a variable. In the Variables panel, rename it Trace Timer.

Use Clear and Invalidate Timer by Handle to stop the timer. Drag Trace Timer from the Variables panel (Get Trace Timer) and connect it to Handle.

A5. Create the Line Trace Logic
Use Sphere Trace By Channel rather than Line Trace. The sphere width means the player doesn’t have to aim precisely at interactable objects.
See the Traces in Unreal Engine overview in the Epic documentation for more detail.

Build the math for the trace start location as follows. Take time with this: hover over nodes for documentation pop-ups. Note the Divide nodes and type-conversion nodes. Did you need to uncheck Context Sensitive to find Convert Screen Location To World Space?

When you first create the Add and Multiply nodes, they accept Vector3 values. Right-click around those fields to Promote to Variable; this creates a New Var node. Rename it Trace Distance, change the type to Float, and set its Default Value to 250.0.

Set the following on the Sphere Trace node:
- Radius:
5.0 - Draw Debug Type:
For Duration - Draw Time:
0.1

From Return Value, add a Branch to detect whether the trace hit something. Drag from On Hit to Break Hit Result so you can check whether the hit actor has the Interactable tag. Continue building as shown — don’t forget the tag value for Actor Has Tag.

Promote Hit Actor to a variable — rename it Interactable Item. Add a new Boolean variable named bCanInteract.

For the false branch, clear all look-related state. Add a Print String to test the result.

Back in On Interactable Overlap, add two Draw Trace calls as shown. Test the system now.
This EventGraph has a lot of detail; don’t be discouraged if something doesn’t connect first try. Check every pin and parameter methodically.

You should see output in the print log:

Currently the trace fires every 0.1s continuously. Let’s optimize it: only Set Interactable Item when the actor has actually changed, not on every tick.
Add the two new Branch nodes shown at the far right. Insert them between the existing Branches and Sets. Note the Equal and NOT node integrated here: what are they checking?

Save All
The behavior is the same as the GIF above, but Print "Looking" and Print "Not Looking" now only fire on state change, not repeatedly.
A6. Final Blueprint Structure
BP_Interactable_Base:

InteractionComponent — On Interactable Overlap & Draw Trace:

InteractionComponent — Detect Sight:


Chapter B: Create Hover Effects
B1. Create Hover Logic
In BP_Interactable_Base, create two custom events: On Hovered and On UnHovered.

Back in InteractionComponent, insert the nodes highlighted in red below. Note: Is Valid is found under “struct” – look for the ? icon on the node.
Insert the red-rectangle nodes again in the second location. This prevents errors – we set the item to UnHovered first, then to Hovered, ensuring clean state transitions.

Back in Draw Trace, add the new nodes shown below the red line.

Back in BP_Interactable_Base, the On Hovered and On UnHovered events are now ready for any logic you want to attach: a sound, a highlight, a post-processing effect. Use a Print String to test first.

B2. Add a Hover UI
Right-click in the Content Browser and navigate to UI → Widget Blueprint → User Widget. Name it WB_InteractionTip.

From the Palette, drag a Canvas Panel into the UI area, then add an Image inside it. Set your texture: Details → Brush → Image.

B3. Set Hover UI to the Item Blueprint
In BP_Interactable_Base, add a Widget component. Rename it and parent it under the mesh.

In the Viewport, move the Widget to the top of the mesh.

In Details, set:
- User Interface Space:
Screen - Widget Class:
WB_InteractionTip

Uncheck Visible (the widget starts hidden).

Add show/hide logic to your On Hovered / On UnHovered events.

The hover UI should now appear when the player looks at the object:

Chapter C: Create Base Interact Event
C1. Create an Event
In BP_Interactable_Base, add a custom event named Interact. Add an input of type Actor, named Character.

C2. Bind the Event to E
In InteractionComponent, add an E Key node.

When bCanInteract is true, Cast to BP_Interactable_Base and call Interact.

Right-click to Get Owner and connect it to the Character input on the Interact node.

Any logic you add inside BP_Interactable_Base’s Interact event will now run when the player presses E.

What you can now build
- A reusable interactable base class that any specific item type can extend
- A sphere trace that detects what the player is looking at, firing only on objects tagged
Interactable - A hover UI tip that appears when the player aims at an object and disappears when they look away
- An E key interaction that calls a custom event on whatever the player is targeting
- A dedicated Actor Component for interaction logic — separating it from the player character so it can be disabled or swapped independently
Example deviations you are ready for
- A readable note (see Tutorial 802)
- An inspectable object the player can rotate and examine
- A movable item the player can pick up and carry
- A door or drawer that opens on interaction
- A chest or container that reveals its contents
- A switch or lever that triggers a distant event