Hoping someone can help me. Currently implementing audio for a 3rd person game - using physical materials assigned to materials to trigger footsteps (pretty much the standard way I guess).
However, I’m running in to some problems/limitations that I want to overcome. The problem is basically that the same materials are often being used for different areas of the level that would require different footsteps. So for example some kind of metallic green texture might be getting used for both a plastic/linoleum flooring and a metal flooring. This is making switching footsteps difficult, as obviously you can only assign one physical material per material, and even though most areas are using more than one material to create the textures, there’s no clean way to assign a physical material to each material in a way that will make realistic switching possible.
Another similar problem can be found when, for example, players are walking on wooden flooring but then walk up a set of wooden stairs. The textures/materials may stay the same, but ideally I’d want the sound to change from wooden floor to a creakier wooden stairs.
Is there a way to get around this? It seems creating a lot of superfluous materials would be inefficient. I don’t really want to use box volumes if I can get around it, as this also seems a some what messy way of figuring out the issue.
Is there almost a way to “paint” the instructions in, or assign footsteps via meshes instead? I feel like there must be some way to get the flexibility I need in, but haven’t come across a simple solution yet, and wanted to get some ideas and thoughts before implementing a more complex system unnecessarily.
Sort of. So you can just apply physical materials to meshes - if you double click on the mesh there will be an option inside the mesh to do it.
Or, if you click on the mesh and then scroll down the side panel of the mesh properties in the editor, you can find a physical material override button there where you can assign a physical material.
But, there is a limitation - meshes using complex collision as simple collision don’t work annoyingly. I have not found an obvious workaround for this - it appears to be a bug or limitation to the UE workflow. The Line Trace just doesn’t seem to recognise the collision. Using Simple and Complex doesn’t seem to work either (at least not for more complicated areas like stairs etc.)
The way I have gotten around this is basically by using a combination of assigning the physical material via the physical material override box for most of the meshes in my level, which use simple collision. For the meshes that use complex collision as simple, I have assigned the physical material to a material on the mesh (usually the dominant or most obvious material - mud for muddy areas, wood for wooden floor etc.). For some reason assigning the physical material to the material always seems to work, no matter what the collision settings are.
I’ve just about managed to make this work. It is a bit cumbersome, but combining both systems has given me just enough flexibility to get all the footsteps I want.
If I’ve understood correctly, I have a different sound for stone floors and stone stairs. They’re both Stone physical material. I check the mesh’s display name for “stairs”, since all my stair meshes have “stairs” in the name.
In short: trace > hit component > switch: stone > branch: if stair mesh, play that sound.