- Home /
Different footstep sounds on terrain
Hello,
I have a question regarding unity terrain. Is it possible to play different footstep sounds depending on the surface?
This is no problem when I use own models from a 3d program because I can simple tag objects or ask for the material, but what is the best solution when I have more textures eg rock and grass on the terrains splatmap, is there a simple way to differ between them?
Theoretical it should be possible when I ask for the alpha values of the materials below, but I dont know how to get them?
My alternative solution is to set trigger areas all over the terrain, but before I start with it I just wanted to check if there are any better solutions out there?
I´m thankfull for every idea!
Answer by lyzard · May 27, 2012 at 10:32 AM
you could retrieve the main terrain texture under your character's feet, that is the one with the highest weight. You can check: http://answers.unity3d.com/questions/34328/terrain-with-multiple-splat-textures-how-can-i-det.html
Your answer