
Unreal Engine 5 Enemy AI #4 – Build a Distraction System with Noise & AI Hearing
Part 4 of the UE5 Enemy AI Series. Learn to build a distraction system with throwable objects, sound cues, and AI hearing perception—all in Blueprints.
Welcome back! In Part 4 of the Unreal Engine 5 Enemy AI Series, we’re stepping into stealth gameplay.
Up until now:
- Part 1 → Enemy Blueprint + AI Sight
- Part 2 → NavMesh + Patrol Paths
- Part 3 → Chasing & Forgetting system
Now, we’ll go further by building a complete distraction system: throwable objects that make noise, proper 3D audio cues, and AI guards that can hear, investigate, and forget if nothing is found.
All of this is done 100% in Blueprints, no C++ needed.
🎯 What You’ll Learn
- Creating a throwable distraction object with UE5 modeling tools
- Setting up 3D sound effects (attenuation & spatialization)
- Adding Blueprint logic to spawn and throw objects
- Configuring AI Perception Hearing
- Making enemies investigate noises then return to patrol
- Organizing project folders for clean workflows
- Debugging & best practices for AI events
📝 Chapters
- 00:00 – Intro & What You’ll Learn
- 00:54 – Creating a Throwable Object
- 02:54 – Setting Up Input Action to Throw
- 04:04 – Adding 3D Sound Effect
- 05:28 – Organizing Blueprints
- 06:12 – Throwable Blueprint Component Setup
- 07:57 – Adding Noise Logic on Impact
- 10:05 – Spawning & Throwing the Object
- 13:00 – Adding AI Hearing Perception
- 14:26 – Wiring AI to React to Noise
- 15:49 – Fixing Forget Logic for Noise
- 16:12 – Refreshing Enemy in Level
- 16:38 – Final Test & Outro
⚙️ Step 1: Create a Throwable Object (Mesh)
- In Content Drawer, create a new folder →
3DModels
. - Switch to Modeling Mode (
Shift+5
). - Under Sphere Tool, set:
- Radius =
10
- Accept to save mesh directly in
3DModels
folder.
- Radius =
- Rename mesh to
MySphere
. - Double-click to open Static Mesh Editor → Collision → Add Sphere Simplified Collision.
👉 This ensures it interacts with physics & overlaps properly.
⚙️ Step 2: Input Action for Throw
- In Input/Actions folder → Create Input Action:
IA_Throw
. - Open it → Value Type = Digital Bool.
- In Input Mapping Context (IMC_Default) → Add Mapping:
- Action:
IA_Throw
- Key:
Q
(or any key of choice).
- Action:
👉 Now the project recognizes a “throw” command.
⚙️ Step 3: 3D Audio Setup
- Create new folder →
Audio
. - Import sound file (
.wav
or.ogg
, not.mp3
). - Right-click → Create Cue →
BallDrop_Cue
. - Open cue:
- Enable Override Attenuation
- Set Inner Radius + Falloff Distance for realistic fade
- Adjust Volume if needed
👉 With attenuation on, sound will only be heard near the impact, not globally.
⚙️ Step 4: Create Blueprint – BP_Throwable
- In
Blueprints
folder → New Actor Blueprint → nameBP_Throwable
. - Add Components:
Static Mesh
→ assignMySphere
Projectile Movement
- Static Mesh settings:
- Collision = Block All
- Simulate Physics = OFF
- Enable Gravity = ON
- Projectile Movement:
- Initial Speed =
1000
- Max Speed =
10000
- Should Bounce = ON
- Disable “Initial Velocity in Local Space”
- Initial Speed =
👉 Ball now behaves like a proper projectile.
⚙️ Step 5: Noise Logic (Impact)
In BP_Throwable
Event Graph:
- Add Event Hit.
- Exclude player collisions:
Get Player Controller
→ compare with Other Actor → Branch.
- True branch → Add Do Once (prevents spam from bounces).
- Add:
- Play Sound at Location →
BallDrop_Cue
- Report Noise Event:
- Location = Hit Location
- Loudness =
1.0
- Tag =
ball
- Instigator = Player Controller
- Print String → “We made some noise” (debug).
- Play Sound at Location →
👉 Each throw now emits sound + noise perception for AI.
⚙️ Step 6: Throwing the Object (Character Blueprint)
In Player Character Blueprint:
- Add Arrow Component (spawn point). Position:
- X =
60
, Y =50
, Z =60
- X =
- Event Graph: On IA_Throw Pressed:
- Spawn Actor from Class →
BP_Throwable
- Transform = Arrow World Transform
- Collision Handling = Always Spawn (ignore collisions)
- Spawn Actor from Class →
- From return value:
- Get Projectile Movement → Set Velocity
- Velocity = Actor Forward Vector × 2000
👉 Ball now spawns & launches in front of player when pressing Q
.
⚙️ Step 7: AI Hearing Perception
In BP_EnemyGuard
:
- Select AI Perception Component.
- Add new Sense Config → AI Hearing Config.
- Hearing Range = adjust to your map (e.g., 1500–2000).
- Max Age =
5s
(memory span for noise). - Detection by Affiliation → Check Detect Neutrals & Friendlies.
- Optionally → set Dominant Sense = Hearing.
👉 AI now listens for noise events.
⚙️ Step 8: Blueprint – Reacting to Noise
In Event Graph of Enemy:
- From On Target Perception Updated → break AI Stimulus.
- Check Tag =
ball
. - If true → Run AI Move To:
- Pawn = Self
- Destination = Stimulus Location
- If false → keep old sight logic (chasing player).
👉 Enemy now investigates noise sources like thrown balls.
⚙️ Step 9: Fix Forget Logic for Noise
- On On Target Perception Forgotten:
- Remove old Player-only cast.
- Directly reset speed → Patrol Speed (300).
- Resume Patrol loop.
👉 Prevents cast failures when AI forgets non-player stimuli.
⚙️ Step 10: Testing & Refresh
- Delete old enemy actors from level.
- Drag fresh
BP_EnemyGuard
into level (ensures no cached logic). - Hit Play:
- Press
Q
→ ball spawns & lands → noise event triggered. - Enemy hears → moves to location.
- If no player seen → forgets after 5s → resumes patrol.
- Press
✅ Final Results
You now have:
- Throwable distraction objects 🎱
- Proper 3D sound & AI hearing 👂
- Enemies that investigate noises 🕵️
- Forget system returning them to patrol 🌀
This lays the foundation for stealth mechanics and more dynamic AI behaviors.
🔗 Resources
- 🎵 Ball Drop Sound Effect (Google Drive)
- 📺 Full AI Playlist on YouTube
- 🌐 rambod.net
- 📚 Unreal Engine 5.6 Docs
📺 Watch the full tutorial here:
👉 https://www.youtube.com/watch?v=-3o779k_QMo