Setting up Footsteps with DEPTH and Surface Detection in Native Unreal Using Custom AnimNotifies

Creating custom AnimNotify blueprints to implement footsteps.

UNREAL AUDIO

ChrisChen

7/14/20252 min read

I've seen people implement footsteps in various ways, but going with custom AnimNotifys is my preferred method. It can take a bit of coding and familiarity with blueprints. I highly suggest taking some of Stephen Ulibarri's C++ with Unreal courses. I've taken several and they have proved to be very helpful in understanding Unreal Engine as a game dev and not just an audio designer

Now to the meat—You can start by making a specific folder where your audio assets are and create an AnimNotify Blueprint class

Once you create one, you'll want to add a function and select the received notify in the override dropdown

You can take a look at this blueprint by holding ctrl + scroll to zoom in or out and hold the right mouse button down to move around freely.

Notice that I've promoted the Socket Location Name to a variable that then runs through a check to see whether it is foot_r or foot_l. If it isn't attached to one of these, it won't run the line tracer. We could potentially mod this blueprint a bit and make it usable for other sounds as well.


The sound spawns and attaches at the attached SocketLocation, allowing the sound to follow the movement of the socket in the animation if bFollow is set to true. Following can be good for a big boss animation swinging a giant weapon or when you want the sound to travel with movement. If it is false, it will simply play once at the location and not follow.

Here's a closer look at the Data Asset blueprint.

There is a bool that's being casted to the BP_Character where a collision box sets the bool to true if touching water and sets the switch to a sound which triggers a wading of water sound vs a foot-slapping-puddle sound when the line trace detects water. Here's a link with a time stamp if you want to hear what I'm talking about.

Here is a simple MetaSound graph with a groups of heels and toes that can be swapped out and used as a preset for different surfaces.

We have to make sure we go and set all the surface types in our project settings, match them to the meta sounds, then add and set our Meta Surface Sound Type variable in the notify blueprint.

That's it! We can also use something very similar to detect surfaces of projectile impacts