How can I make it where the auto material technique can work with physics materials? The auto material technique is basically rock texture will automatically paint depending on slope height while the grass is on top and then you have rocks etc. Please help because I was up ALL night trying to get this to work because I need to find a way to make it where the footstep sounds can respond to the terrain/material type via Physics Material OR some other technique I’m not aware of.
This thread dates back more than three years but the technique still works: Different Footstep Sounds on Different Materials - Unreal Engine Forums
Wondering if you’re gonna have to cheat and find a way for the pawn to detect the slope angle + material layer it’s standing on
Would be nice to have a node for our mats though
I did this, but for some reason it only plays the sound when I paint on the terrain even when the entire map is covered in grass and rock with physics assigned to their layers.
Post #20 in the original thread I pointed you to:
Still not working – am I missing anything?
Before I forget: I only used grass for testing and it isn’t working.
Which value do you get out of Get Surface Type? Can you try to add at least another material to see whether it makes any difference?
Well now there’s no noise even when I assign the terrain Physics Material’s default.
OK I did more testing but it seems that it only works if I make a new material with no layers and assign it to a cube. This is bothersome because there’s clearly grass on the terrain and the layer for the grass has the Physics Material assigned to the same material used on the cube. I don’t know what the hell is going on, but maybe Unreal doesn’t support a feature for auto material?
Is it possible that the Line Trace is not colliding with the terrain? Do you get any collision at all out of it? Can you put a Print String out of the Branch after the Line Trace to make sure collisions are taking place?
Seems that it’s working, but no sound. Again the same material works on a cube, but not the terrain.
So you get the collision of your Line Trace with the terrain BUT Get Surface Type doesn’t return the type of material from the hit? What does it return then?
The Get Surface does work, however it just doesn’t work with Terrain. Say the Surface Type is Grass_PM(physics material.) I have a layer on the landscape called “Grass” and it uses the “Grass_PM.” However it doesn’t work BUT if I were to make a new material with no layers or auto terrain, just a simple plug of textures in the basic inputs(diffuse, rou, etc.) and set the PM to Grass_PM, it will work. I can get the terrain working again, but it would require me to go back to manually painting textures on the terrain. I want it where the textures are automatically placed on the terrain with working surface type sounds.
Honestly I don’t see any reasons why it shouldn’t work with auto-materials and work instead with vertex painting. I believe the problems is elsewhere, either in the collisions settings or on the way the Line Trace is done. Any chance you can share part of your project or a sample that shows the issue? This way it would be easier to have a look and try to help further.
Would recording a video help?
Not really. Not to diagnose and solve this kind of issue. It shouldn’t be difficult though to put together a sample project reproducing the problem and share it here.
OK I’m putting together a sample project.