Change footstep sound based on material

Here’s a solution that uses a custom AnimNotify Blueprint, and isn’t dependent on the animation blueprint or other classes:

  • Setup SurfaceTypes in ProjectSettings
  • Create Blueprint class based on AnimNotify named FootstepNotify
  • In ReceivedNotify of the Blueprint, perform the line trace against visibility, get surface type, play event at location (with AutoPlay disabled), set surface type parameter on the event, then play the event (See blueprint graph below)
  • In FMOD, use a single event with one parameter called SurfaceType, and place MultiInstruments on the SurfaceType timeline (not on the main timeline), at each integer value (0, 1, 2, …) that match the SurfaceTypes you defined in ProjectSettings (the Celeste demo project from FMODs site has an example of this setup)

https://blueprintue.com/blueprint/q92irdvu/

Note that the example graph plays sound at the owning actors location (center of body), our game is top-down so precision of where the sound is coming from didn’t matter, might want to change that to the hit location if its a 1st or 3rd person game with closer camera.

2 Likes