Water depth footstep sound effects

Hello all, I am trying to set up a sound effect system for an ocean shoreline, that changes your footstep sound effect based on how deep the water is getting. Now I know that you have to set up line traces and all that, but how do you get them to detect meshes that don’t have collision (the water), let alone detect how deep the water is? What is the primary setup in this case? Thanks in advance! :slight_smile:

1 Like

You would use a system, that gives you approximation of your water surface on CPU.

You have to setup custom collision channels and stuff like that. I don’t know the details.
Maybe here you find some info Collision Filtering - Unreal Engine

What does a blueprint for this look like?

This video will help you
Let's Build the RPG! - 20 - Water Footstep and Jump landing Sound Effects - UE5 Blueprint Tutorial - YouTube

This doesn’t work with oceans, I have tried every thing I can think of of nothing returns anything other than “default physical material”

The ocean is at a set height => it never changes.
Just compare your characters world position Z to the Z position of the ocean.
Depending on the distance set certain thresholds to fire off different sound effects.

Actually it does change depending on the wave depth, I finally got it to work by getting a collision profile name return on the Hit component output and comparing it with a == node to WaterBodyCollision and on True applying the appropriate effect. Now my characters footsteps register the water as it laps under them and can apply appropriate depth sounds as the waves change the depth of the water. I was trying to figure this out specifically to adjust the sounds on the fly as the character runs along the edge of the water on the beach so as the waves propagated under the characters feet the “splash” sounds would play but when they receded the “wet sand” sounds would play and the further out in the waves you ran then different assets etc.

1 Like