- Home /
Need help coding different footstep sounds on different surfaces - Beginner`
I'm using the first person character controller. The way i'm trying to do it is with box colliders and tags. So, i have my stone floors tagged with "stone" and my grass surfaces tagged with "grass". I have a very, very basic understanding of coding. I don't even know how to get started, really. A few people have suggested raycasting straight down, but I'm not sure how to do that at all. My main problem when people send me code is I'm not sure what to replace with my own. Thank so much ahead of time if anyone is able to help me! I'm using C#.
Have you looked at the Scripting API entry for Physics.Raycast? If yes, where are your problems when implementing it, or what parts of it do you not understand?
Thank you for responding! No, i have not looked at it. I had some code presented to me, but i understood almost none of it.
Answer by Kamil1064 · Nov 24, 2016 at 07:09 AM
Check this one: https://forum.unity3d.com/threads/detecting-terrain-texture-at-position.94723/ It's for terrain, and give us your code.