Setting up a complex material switching footstep system.

I’ve posted about this before, so apologies in advance to those who offered thoughtful replied, but I’m coming at it from a slightly different angle and wanted to try and get some thoughts.

I’m setting up a fairly standard footstep switching system that switches by material (standard line trace, find physical material, play relevant footstep sound cue). The problem is, the level I’m using has meshes and landscapes that are using multiple materials, sometimes as many as 5 or 6 per asset, so the footstep system is often wrong - for example there may be a blue material assigned to something that’s supposed to sound like concrete and something that’s supposed to sound like sheet metal, but it’ll play whatever sound is attached to the physical material.

I’ve been trying to think of ways to get around this. Someone suggested a volume based footsteps system, which is a possibility. However I’ve been thinking if there is a way to combine the two approaches?

The footsteps work for 75-80% of the level - it’s only really key assets that aren’t playing nice. Most of them are meshes of specific objects in the level - a staircase, an elevator etc.

I wondered if there might be a way to do a line trace, check first if the player is standing on a mesh that is part of a database of meshes with assigned physical materials and, if not, then check what material the player is standing on? This may be a way of allowing meshes with unique footsteps priority.

Or perhaps another way would be to check for a box volume first and then, if none is present, move to material - that might limit me having to box volume the entire level meticulously.

Thanks in advance for any thoughts on this!

Can you post a short video highlighting the problem? I have a pretty solid idea of what you are referring to, but want to be 100% before moving forward.

You can have one mesh return multiple materials when you’re using complex collision, but with simple collision, only one physical material is returned, probably the one from the first applied texture. Maybe you can use custom simple collision for those meshes that should always return one physical material?