Detecting footstep sounds on auto blended landscape layers

Detecting footstep sounds on auto blended landscape layers

So we’re using a typical footstep detection system, a line cast down to determine the surface type, and then a switch for the certain surface. We’re now moving on to using auto blended landscape layers and it no longer works. It’s only reading the base layer. Is there a way to set it where it reads the most prominent material in a blended layer to play the sound of? Seems to be a common question. Thanks

Are you using the LandscapeLayerBlend node?

Bumping this.

I’m assuming he is using LandscapeLayerBlend, but with auto blending there could be multiple types of terrain reflected in only one landscape layer.

We need the ability to add physical materials into the Material Attributes node.

Here is a solution video I made for you Dassoop which uses an interesting workaround (Synchronizing your blueprint math with your landscape material math) can cause both to come to the same result.

The answer provided is basically only an answer if you’re using math. Has anyone figure out how to achieve this when you’re hand painting these blended materials in?

What we did is:

  • Assigned physical materials to the layers in the blended landscape.
  • Hooked up the animation notifies to do a line trace and look for those materials.
  • These first two steps are essentially what you’ll find being done here: UE4 Tutorial: Footstep Sounds on Different Materials (Request) - YouTube (ignore the material creation since you’ve surely already made your blended landscape)
  • The extra tricky bit required changing the landscape’s collision settings to custom, and set to ‘query only,’ making sure that the channel in the line traces is set to “blocking” here but I’m pretty sure everything is already set to blocking.
  • And the most tricky of all is having had to toggle the “generate overlap events” checkbox on and then back off again because unreal is a fickle mistress.

Hope this helps!