Lesson 3 gave you readable cover and beats. Now you teach the body to respect that space: slow and fast movement, crouch height, and hooks for noise and exposure so Lesson 5 perception has signals to read.

This lesson stays intentionally system-light. You are not building full gadget or AI logic yet. You are locking a controller contract: what “sneaking” means in numbers, and how designers can reason about detection later.

Course illustration - product design study from Dribbble


Lesson objective

By the end of this lesson you will have:

  1. A player pawn (Blueprint or C++ child of Character) with crouch and at least two forward speeds (walk or sneak vs jog or run).
  2. Documented default capsule and crouch heights that fit your Lesson 3 door and cover dims.
  3. Stub events or floats for footstep noise and a visibility score (even if AI ignores them until Lesson 5).

Step 1: Pick your template and align scale

  1. Use your Lesson 2 folders: place player assets under /Game/Characters/Player or your agreed prefix.
  2. Start from Third Person or First Person template only if it matches your slice camera; otherwise migrate the CharacterMovementComponent settings onto your greybox pawn.
  3. Confirm capsule half-height and radius against your greybox door frames. If the capsule clips standing but not crouching, your stealth fantasy is already lying to players—fix metrics first.

Pro tip: snapshot standing and crouched capsule bounds in a design note (screenshot or exported values). You will thank yourself when tuning perception cone height in Lesson 5.


Step 2: Enhanced Input actions (UE5 habit)

Create an Input Mapping Context (IMC) for your slice, for example:

Action Suggested default Purpose
IA_Move WASD / left stick Axis2D movement
IA_Look Mouse / right stick Camera
IA_Crouch Ctrl / gamepad face button Toggle or hold crouch
IA_Sprint Shift / left stick click Optional loud-fast mode

Wire the IMC in your player SetupPlayerInputComponent or the Blueprint equivalent. Keep action names stable; AI and UI will bind to the same verbs later.


Step 3: Crouch that changes capsule and speed

  1. Enable Can Crouch on CharacterMovement if you use the built-in path.
  2. On crouch pressed: call Crouch(); on release: UnCrouch() (or toggle with checks for ceiling clearance).
  3. Set Crouched Half Height so the eye height matches your cover silhouettes from Lesson 3.
  4. While crouched, lower max walk speed automatically with GetCrouchedHalfHeight() scaling or a dedicated MaxWalkSpeedCrouched.

Common mistake: animating a crouch without shrinking the collision capsule. Guards will “see” a full-height capsule while the mesh ducks—tune collision first, polish animation second.


Step 4: Sneak versus run (the loudness contract)

Define three bands at minimum:

  • Sneak – low speed, low noise scalar (your baseline for “I am trying to be quiet”).
  • Walk – default exploration speed, medium noise.
  • Sprint – high speed, high noise; use sparingly in stealth missions or gate it behind stamina later.

Implementation sketch (Blueprint-friendly):

  • Float NoiseIntensity replicated or on the player: multiply by speed ratio and a bIsCrouched dampener.
  • On landed or footstep notify, broadcast a NoiseEmitted event with location, radius, and intensity—even if nothing listens yet.

Pro tip: print noise radius to screen for a week. Designers calibrate faster with spammy debug than with perfect UI.


Step 5: Visibility placeholder (exposure without AI)

Until Lesson 5 spawns sight cones, give yourself one honest signal:

  • Line traces from guard eye sockets to player camera or mesh sockets are brittle early; instead, track time in lit vs shadow volume with placeholder volumes, or
  • Maintain a normalized Exposure01 float: 0 in deep cover, 1 in open floor per designer-placed BP_StealthLightingVolume.

Drop a few volumes in your greybox’s riskiest crossings. If Exposure01 spikes and the player is sprinting, you have pre-debugged the moment guards should react hard in Lesson 6–7.


Step 6: Hook into your Lesson 3 beats

Run your two-minute beat walk from Lesson 1:

  • Every risky crossing should be passable at sneak + crouch without clipping.
  • Sprint across an open lane should feel reckless: higher noise and higher exposure together.
  • Document any beat that requires a future gadget (duct, rope) as a dependency note rather than bolting code now.

Mini challenge

  1. Add a debug HUD showing current speed band, NoiseIntensity, and Exposure01.
  2. Stand, crouch, and sprint through your tightest doorway and lowest cover piece from Lesson 3; fix capsule or mesh offset if you snag.
  3. Record three numbers in your design doc: sneak speed, walk speed, sprint speed (uu/s or cm/s).

Troubleshooting

Symptom Likely cause Fix
Crouch slides under doors but standing hits lintel Half-height mismatch Match Capsule Half Height to art; adjust mesh root
Player floats when crouched Animation vs capsule Align mesh relative location or use animation root motion carefully
Input feels muddy Acceleration too low Tune GroundFriction, Braking, RotationRate separately for sneak
Noise events never fire Missing anim notifies Add notifies on walk cycles or timer-based fallback
Sprint everywhere No gameplay cost yet Temporary stamina cap or loudness multiplier for playtests

Summary

  • Crouch and capsule truth are stealth mechanics, not polish.
  • Speed bands + noise stubs give AI something to hear in Lesson 5+.
  • Exposure placeholder bridges greybox lighting to detection design.

Next, Lesson 5: Enemy Perception Setup adds enemy perception—sight and hearing—that subscribes to the noise and visibility hooks you defined here.


Further reading


FAQ

First person or third person for this course?
Either works if your camera height and perception traces stay consistent. Third person often needs tighter cover clearance checks; first person needs stronger audio cues.

Should I use root motion for stealth?
Defer full root motion until animation is locked. Procedural capsule + in-place anim ships vertical slices faster.

Do I need a dedicated “stealth mode” boolean?
A speed band enum (Sneak, Walk, Run) is usually clearer than one vague flag.


When your greybox feels fair at sneak speed and punishing at sprint through open light, you are ready for perception. Bookmark this lesson and proceed to Lesson 5 once your debug HUD matches your design intent.