AI hearing (stealth)

Every step can be heard by AI. How far it carries is the profile's noise distance for the movement (walk 6 m, run 10 m, sprint 14 m, crouch 1.5 m, landing 12 m in Realistic) times the surface's Loudness (soft grass 0.6, metal 1.6) times the character's volume. Crouching on grass is nearly silent; sprinting on metal carries far.

A guard turns towards a sound; the meter shows how loud the player is.
A guard turns towards a sound; the meter shows how loud the player is.

Footstep Listener #

Add Footstep Listener to a guard:

Setting What it does
Hearing 1 normal, 2 hears twice as far, 0 deaf.
Walls Muffle A step behind something solid carries only half as far.
Wall Layers What counts as a wall.
Ignore Own Steps The guard doesn't hear its own feet.
On Heard A UnityEvent with the step's position: turn, investigate, raise the alarm.

From code, Heard gives the whole step (who, where, which surface, how loud), and LastHeardPosition, LastHeardTime and LastHeardDistance01 are always available.

Your own AI can listen to every step without a component: FootstepNoise.Made += step => .... Call FootstepNoise.Emit to raise your own noises (a thrown bottle) through the same system.

Turn noise off per profile (Emit Noise) or per character (Noise: Off).

The Showcase's guarded yard shows it: crouch past and the guard stays calm, sprint and it turns to look.

Something unclear or wrong? Tell us · Get help