UnityFootstepTerrainDetector The following code is a Terrain Detector that will swap the footstep sound depending on what it detects. It will return the name of the plane or object it is standing on. It does this with a raycast.