Hi everyone, I have made an auto landscape material in which places textures based on slopes and such. However, now I am getting to the part of adding walking sound effects to each material. Is there a way to have multiple physical materials into one auto-landscape material? I have been trying to solve this issue but I can’t. Thanks!
I don’t know if you are using layerinfo nodes on your material, but if thats the case you can assign the physical material in the content browser. Select each layer info and open it, there you can assign the physical mat.
An auto material is a single layer, so it won’t give you this option.
You have to re-paint the landscape manually with different layers.
I know it’s a bit late but…
A single slope-based layer can be bounded at one at only one Phys Material. But we could get the set of ranges we can detect via collision with the floor with a single linetrace.
We just define a set of ranges based on player’s collision with the surface, and for each range we associate a sound. So we could just get the angle of the slope and fire a specific sound when the linetrace meet the angle range.
I will show you what I got so far
So we are making a TraceByChannel from the foot of our char and then getting the impact normal from it. We need to calculate the dot of impact normal with a custom vector (0,0,1) and then arc cos it with degrees, this will result the angle of the surface in degrees.
If we then detect the phys material that is on the surface and make a range from the angle… We will be able to override the phys material with the material of the slope by the angle range
To finally put the desired sound at each physic material that we want ! Also, we could even spawn the footsteps decals for each phys material this way
Hope this helps