# Distance Parameter not working

**URL:** <https://qa.fmod.com/t/distance-parameter-not-working/20573>\
**Category:** Unity\
**Created:** [August 21, 2023, 10:51am UTC](https://qa.fmod.com/t/distance-parameter-not-working/20573 "2023-08-21T10:51:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilhelm\_LikeAStar](https://avatars.discourse-cdn.com/v4/letter/w/e47774/32.png) [@Wilhelm\_LikeAStar](https://qa.fmod.com/u/Wilhelm_LikeAStar)\
**Post date:** [August 21, 2023, 10:51am UTC](https://qa.fmod.com/t/distance-parameter-not-working/20573/1 "2023-08-21T10:51:18Z")

</div>

It gives me a weird same value always. I am playing the EventReference from EventEmitter and it does plays the EventReference but not updating the Distance parameter. Also the pitch shifter not works as the result.

**For the EventReference settings:**  
I added the Spatialization without Distance Parameter and Pitch Shifter to change with Distance Parameter  
**Note: Hold Value During Playback is set to true in Distance Parameter already.**

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

As the documentation says, it should update automatically with nearest listener.  
Profiled the game from FMOD, the parameter is not showing up. Only log works somehow.  
**Ref:** [https://www.fmod.com/docs/2.02/studio/parameters-reference.html#distance](https://www.fmod.com/docs/2.02/studio/parameters-reference.html#distance)

-Solution  
This is because the order of effects you use. In mine as i said, i used Spatializer and Pich Shifter.  
I think it renders from left to the right and it actually overrides the Distance parameter to something that u w’ont want.  
So Spatializer was in left side and Pitch Shifter was in right side. I switched those and worked.

**Works but log is still giving me same value in the log.**  
Well, the getParameterByName() overclocked by 3 values. string, initialvalue and final value. I am a dumb logging the initialvalue. It gives the right value but i dont know why this didnt work with left-sided spatializer then

---

<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:** [August 23, 2023, 5:32am UTC](https://qa.fmod.com/t/distance-parameter-not-working/20573/2 "2023-08-23T05:32:10Z")

</div>

Hi,

What version of FMOD and Unity are you using?

Could I get a screenshot of the event including the distance parameter and the values it is automating?

> [@Wilhelm\_LikeAStar](#):
>
> I think it renders from left to the right

This is correct, you can read more about how our signal chains work here: [FMOD Studio | FMOD Studio Concepts - Signal Chain](https://fmod.com/docs/2.02/studio/fmod-studio-concepts.html#signal-chains). I hope this clarifies things.

> [@Wilhelm\_LikeAStar](#):
>
> It gives the right value but i dont know why this didnt work with left-sided spatializer then

Could you elaborate on the issue here? When the spatializer is in the correct position you are reading the values you expect, however, when it wasn’t the values were not right at all?

Thanks

---

<div class="post-metadata">

**Author:** ![Wilhelm\_LikeAStar](https://avatars.discourse-cdn.com/v4/letter/w/e47774/32.png) [@Wilhelm\_LikeAStar](https://qa.fmod.com/u/Wilhelm_LikeAStar)\
**Post date:** [October 6, 2023, 7:58pm UTC](https://qa.fmod.com/t/distance-parameter-not-working/20573/3 "2023-10-06T19:58:37Z")

</div>

Hi, everything is okey now 😃 This question was from my learning stage for FMOD ☹

---

<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:** [October 8, 2023, 8:54pm UTC](https://qa.fmod.com/t/distance-parameter-not-working/20573/4 "2023-10-08T20:54:18Z")

</div>

Hi,

That is good to hear, if you have any more questions please do not hesitate to ask!
