Unreal Implementation Question....
I’m looking to implement footstep sounds for enemies in my Unreal 5 project. It’s a first-person action game. I’m looking to create a system that’s scalable, allowing me to implement different footsteps sounds for different enemies, as well as variations for walking/running/strafing, and different surface types. It also needs to account for those animations being blended. For this reason, I don’t think I can simply do it via play sound anim notifies on each animation, as i’ll get a double up of sounds being triggered when animations are being blended.
My (not so) trusty LLM is suggesting I add a curve to all my animations that’s sync’d with the footstep timing, a data asset for each enemy that contains a struct for my walk/run/strafe metasounds, along with surface variations, then implement this via my abp’s so that when the curve crosses a certain threshold, it triggers the associated metasound. That’s a very summarised version, but the essential jist of it. Supposedly, this will solve the blend problem, as the curves will be interpolated between the animations being blended.
I’m going to give this a try tonight but would love to hear from some people that know more about this than me. Does this sound like the best approach to do something like this in Unreal? Or could there be a better way to do it?
UPDATE: So in the end I landed on a relatively simple solution in a custom notify that’s applied to each animation, with the blend’s notify priority set to ‘highest weighted animation’. It’s barely any less work creating curves for each animation than it is to add a few footstep notifies.
I’ve used the custom notify in combination with a struct that contains 3 metasound source variables so i can play different meta sounds for walking, running and strafing. That struct is added to my base enemy bp so i can set the sound sources individually for each child. The notify has an enum exposed so in the animation, I can set each notify to walk/run/strafe, which then feeds into a select node that pulls the relative sound source from the enemy bp.
It should be relatively easy to add another layer on top of all this to implement variations for different surfaces, but for what I need right now, this gets the job done.