# Footstep sounds based on surface type UE4

**URL:** <https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612>\
**Category:** Unreal Engine\
**Tags:** ue4\
**Created:** [September 3, 2023, 3:40am UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612 "2023-09-03T03:40:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exorf](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@Exorf](https://qa.fmod.com/u/Exorf)\
**Post date:** [September 3, 2023, 3:40am UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/1 "2023-09-03T03:40:25Z")

</div>

Greetings, kind people

I’m trying to make a footstep system with fmod. It needs to be able to track the surface type to play different sounds. It works fine with popular LineTrace method, but there is a problem with minus Z coordinate.

When map landscape is under Z coordinate (when Z is negative), the trace have nothing to hit, so there is no sound because of that.

I know another method for this([https://www.youtube.com/watch?v=BUFBU24JJ\_A](https://www.youtube.com/watch?v=BUFBU24JJ_A)), based on ALS. It’s using foot IK instead of LineTrace, so there is no problem with negative coordinate. But I was able to make it work only with Unreal Sound Cue, not with FMOD.

Is there any way to make it work with FMOD? Or Is there any way to solve the negative Z problem with LineTrace method?

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [September 3, 2023, 11:11pm UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/2 "2023-09-03T23:11:03Z")

</div>

Hi,

What version of FMOD and UE are you using?

It is possible to have parameters set to negative values:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4ba443b9f69bca57c53cb1f342c34f325a735f0d.png)  
Would it be possible to get a screenshot of the event that you are using? How are you setting the parameters inside Unreal?

---

<div class="post-metadata">

**Author:** ![Exorf](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@Exorf](https://qa.fmod.com/u/Exorf)\
**Post date:** [September 4, 2023, 7:08am UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/3 "2023-09-04T07:08:24Z")

</div>

Yes, sure

So here is how this system look like in UE animation blueprint

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7df6afb0d63c8770a24748917c9e043d64d8c36e.jpeg)

Just a script from this tutorial ([https://www.youtube.com/watch?v=3xVcA-TSpk4&t=720s](https://www.youtube.com/watch?v=3xVcA-TSpk4&t=720s))

The problem is here, where it says Z 100

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/3fede1cc94277afb3ebfc5c705b28bef1b4b4a62.png)

this grid is dividing negative and positive Z, so when player is walking **under** this grid - event is not triggering, only **above**.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/5/55fa22db9399948bdbfcd4fe2602c3c45980994d.jpeg)

Step events look like this. Just a container with sounds. The logic is in the blueprint

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/5/59683bbb54d5741bd04e07945025118a8ed491b2.png)

It would seem logical to just build level above this grid, so Z is always positive, but in my case, when lvl designer already built most of levels - it is not possible

We are using UE 4.27.2. And my FMOD is 2.02.08

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [September 4, 2023, 11:08pm UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/4 "2023-09-04T23:08:45Z")

</div>

Hi,

Thank you for the screenshots.

In this image

> [@Exorf](#):
>
> ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/3fede1cc94277afb3ebfc5c705b28bef1b4b4a62.png)
> 
> image1055×568 114 KB

I noticed the `AnimNotify_Footsetp` isn’t connected to the `LineTraceByChannel` node. This may be connected to the issue? Are you hearing any footsteps at all or only when you are in positive `Z`?

---

<div class="post-metadata">

**Author:** ![Exorf](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@Exorf](https://qa.fmod.com/u/Exorf)\
**Post date:** [September 5, 2023, 3:43am UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/5 "2023-09-05T03:43:48Z")

</div>

Oh, yes. My bad. Yes, it is not connected. But I did it on purpose, because I was trying another version of this script. So I needed this to be unconnected.

Yea, when it’s connected, the footsteps only heard on only when I’m in positive Z, and thats the main problem

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [September 6, 2023, 6:03am UTC](https://qa.fmod.com/t/footstep-sounds-based-on-surface-type-ue4/20612/6 "2023-09-06T06:03:06Z")

</div>

Hi,

Thank you for the information.

Would it be possible to record an [FMOD Studio | Profiler](https://fmod.com/docs/2.02/studio/profiling.html) session, keeping an eye on the location of the events in the 3D space:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/650a532409ed908ffb2a3d769d2e174b4f5254f9.png)  
This will let you know if the events are being played in a location you expect or if having a negative value is affecting their positions.

Would it be possible to [upload](https://fmod.com/profile#uploads) the project to your profile so I could check the blueprint on my side? Please note you will have to [register a project](https://fmod.com/profile#projects) with us to upload to your profile.
