OnCollisionEnter question....

I am creating a footsteps script with my capsule collider-based player:
I am having an issue with collision detection… If i am on a surface below me and i collide with a new surface in front of me (such as a wall), the collision detection chooses the wall (concrete) sound to play, instead of the ground that i am standing on.
Is there a way to make sure that the collision contact is only hitting the bottom of my capsule collider? Thanks

What you could do is add a collider under the capsule player and make it a child of the player. You could also add a script to the player which detects the tag of the object it’s colliding with.

var objectTag : String;

function OnCollisionEnter(col : Collider){
          if(col.tag == objectTag){
                    //add the sound part here