i try to do footstep system by raycasting here is script that i made
public float distance;
void Update(){
Raycast hit;
Ray footstepRay = new Ray (transform.position, Vector3.down);
If(Physics.Raycast(footstepRay, out hit, distance)){
If(hit.collider.tag == "terrain"){
}
}
}
here is the question :
how to check the material of terrain layers so that i can check which material player stands on?
Check out my video tutorial on how to get footsteps working, if you’re still looking for a solution. My C# script is included in the video description, as well.