Different Footstep Sounds on Different Materials

I apologize for not responding with my solution, somehow it all got lost in my own work, haha. But I have actually thought of doing an in-depth tutorial (a text one, not video) sometime. What would be a good place to post this? The wiki?

In the meantime, allow me to give you a screenshot of my anim blueprint:

Basically, I’ve created anim notifies at certain frames in the animations, which whenever that frame is played, triggers the event.

(I realized after playing around for some time that the footsteps started getting triggered as soon as the walk/sprint animation started blending in, so the player could have like 0.1 in speed, and the footsteps still got triggered, so in the beginning of each footstep, I just see if the “speed” value is under a certain point. If it is, don’t play the sounds.)

So, whenever the player takes a footstep it does a single line trace. The start point being the current player character, and the end point being the location, minus 150 in the Z dimension. After that, a serious of values are checked. First, check if it even hit something, and only then play the sound. Also, break the hit result to get the location where the trace hit, and play the sound from there (should only matter if the sound itself has attenuation settings). Also, get the surface type. Here comes one of my favorite nodes as of now, the “Select” node.

(Note that you cannot drag a pin out of the “Get surface type” node and create a Select node, you need to create it by just right-clicking anywhere.)

Then drag the surface types into the index pin, and the sound into the return value, and you can effectively choose exactly which sound should be played on which surface type!

I think you already gotten this far, but I feel I should mention this also: To be able to get a surface type form a material, it needs to reference a physical material, which in turn references a surface type. So first, go into Edit>Project Settings. Then under the Physics tab, you can write in your surface types! Metal, wood, etc. Then “Set as default” to save your settings.

Second, create a physical material, practically anywhere you want in your content folder by rightclicking>Physics>Physical Material. You then need to reference that physical material to your surface type by going into your details panel in that Physical material, and under “Physical properties” choose the right surface type.

Third, you need to assign that physical material to the material you want to trigger that surface type. So just go into your material, and literally right below the ball-thingie that showcases the material,m you can choose your physical material!

Sorry for the lengthy explanation, I just hate myself when I find threads that are years old and the guy who got it to work only explains it half-heartedly, haha. But that should cover most, only ask if you need any more help!