# Multiple footstep sounds on landscape

**URL:** <https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356>\
**Category:** Audio\
**Tags:** footsteps, unreal-engine, Blueprint, question\
**Created:** [January 25, 2016, 10:58pm UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356 "2016-01-25T22:58:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SoraJr](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sorajr/32/562282_2.png) [@SoraJr](https://forums.unrealengine.com/u/SoraJr)\
**Post date:** [January 25, 2016, 10:58pm UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356/1 "2016-01-25T22:58:06Z")

</div>

After watching this [Tutorial](https://www.youtube.com/watch?v=fsGwF2ufRAc&index=38&list=PL8zGUshYWj2Oz_qTSOCc9KboPtXCF0ou5) and reading through [THIS](https://answers.unrealengine.com/questions/39349/footstep-sounds-based-on-terrain-paint.html) I set up foot steps oon my character. Now I’m asking how would I set up footsteps on a landscape with mutible textures applied and painted around. I have leaves, dirt, ice, and grass in my landscape material.

---

<div class="post-metadata">

**Author:** ![metamorphium](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@metamorphium](https://forums.unrealengine.com/u/metamorphium)\
**Post date:** [January 26, 2016, 12:08am UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356/2 "2016-01-26T00:08:46Z")

</div>

We are doing this through Physical Material. It has to be set in Project Settings-\>Physics-\>PhysicalSurface and assigned to your materials.

I then fire a raycast straight below the actor to determine what’s down there and fill FText CurrentSurface which contains name of the surface actor is currently on. When you get this text, it’s just a question of a switch.

Btw. I am doing this in C++ for sake of speed but since this is Blueprints section, you can at least get some basic idea about what nodes to look for.

```
void ATheForestCharacter::TracePhysicalSurface()
{
	FVector StartTrace = FVector::ZeroVector;
	FVector CamLoc;
	FVector target;
	FCollisionQueryParams TraceParams;
	FHitResult currentHit;

	CamLoc = FirstPersonCameraComponent->GetComponentTransform().GetLocation();

	target = CamLoc + FVector(0.0f, 0.0f, -300.0f);

	TraceParams = FCollisionQueryParams(false);
	TraceParams.AddIgnoredActor(this);

	GetWorld()->LineTraceSingleByChannel(currentHit, CamLoc, target, ECollisionChannel::ECC_MAX, TraceParams);
	
	UPhysicalMaterial* physMat = NULL;

	if (currentHit.IsValidBlockingHit())
	{

		UPrimitiveComponent* comp = currentHit.GetComponent();
		if (comp)
		{
			UMaterialInterface* mat = comp->GetMaterial(0);
			if (mat)
			{
				physMat = mat->GetPhysicalMaterial();
			}
		}

		if (physMat)
		{
			const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, TEXT("EPhysicalSurface"), true);
			if (EnumPtr)
			{
				CurrentSurface = EnumPtr->GetEnumText(physMat->SurfaceType);
			}

		}
	}
}
```

---

<div class="post-metadata">

**Author:** ![SoraJr](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sorajr/32/562282_2.png) [@SoraJr](https://forums.unrealengine.com/u/SoraJr)\
**Post date:** [January 26, 2016, 12:16am UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356/3 "2016-01-26T00:16:32Z")

</div>

I’ve figured it out about 5 minutes after posting. I went into the layerinfo for the landscape material

![75994-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/c/9ccf66ba0b73c7776d413719aa11ccc9bd5ca61f.png)

 ![75996-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/a/5da940d250832c8aedb08d1fe0f0e65ae9632d68.png)

I added the Physical Material there, and the sound blends nicely after tweaking it. Now when other people look at this, they’ll have the C++ and the blueprint way. Thank you

---

<div class="post-metadata">

**Author:** ![Dassoop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dassoop](https://forums.unrealengine.com/u/Dassoop)\
**Post date:** [March 23, 2018, 10:43am UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356/4 "2018-03-23T10:43:44Z")

</div>

Is there a way to do this and detect on an auto blending landscape layer. Maybe the most prominent material would be the one to define the surface type of that area?

---

<div class="post-metadata">

**Author:** ![SoraJr](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sorajr/32/562282_2.png) [@SoraJr](https://forums.unrealengine.com/u/SoraJr)\
**Post date:** [March 23, 2018, 7:38pm UTC](https://forums.unrealengine.com/t/multiple-footstep-sounds-on-landscape/345356/5 "2018-03-23T19:38:35Z")

</div>

So you wanted to marge two different sounds together when the character steps on a blended material. I’ve never done that, but maybe that can be done through BP. I would give more information, but I’m not the best programmer. I just copy and paste what I see on YouTube. I’m replying to let you know I see your comment and I didn’t wanna leave you line here.
