# Listener position or built-in distance parameter not working in FMOD 2.00.00 / 2.00.02

**URL:** <https://qa.fmod.com/t/listener-position-or-built-in-distance-parameter-not-working-in-fmod-2-00-00-2-00-02/14815>\
**Category:** FMOD Engine\
**Created:** [June 27, 2019, 4:05pm UTC](https://qa.fmod.com/t/listener-position-or-built-in-distance-parameter-not-working-in-fmod-2-00-00-2-00-02/14815 "2019-06-27T16:05:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgrviper](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mgrviper](https://qa.fmod.com/u/mgrviper)\
**Post date:** [June 27, 2019, 4:05pm UTC](https://qa.fmod.com/t/listener-position-or-built-in-distance-parameter-not-working-in-fmod-2-00-00-2-00-02/14815/1 "2019-06-27T16:05:37Z")

</div>

Hello! I’m trying to get position aware event to working in fmod 2.00, using fmod studio api.

I have event with parameter with type Built-in: Distance and in fmod studio itself everything is working as intended - in 3D Preview i can change position relatively to event and hear difference, but in game (and fmod studios profiler confirms that) only event position have any difference, listeners position is ignored.

I’m using fmod studio c++ api and non position aware events working as intended.  
Every frame before calling FMOD::Studio::System::supdate i’m setting listeners position through FMOD::Studio::System::setListenerAttributes (which returns FMOD\_OK).  
I’m setting position to an event instance via call to FMOD::Studio::EventInstance::set3DAttributes and then start()'ing it. Events position itself is working fine but listeners position is completely ignored and assumed as 0,0,0. Listener attributes itself is fine: i checked by getting it at the start of frame - and position is saved alright.

fmod libs version checked: FMOD 2.00.00 and FMOD 2.00.02

Am i missing something? Or it is indeed not working in preview version of FMOD?

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 2, 2019, 5:34am UTC](https://qa.fmod.com/t/listener-position-or-built-in-distance-parameter-not-working-in-fmod-2-00-00-2-00-02/14815/2 "2019-07-02T05:34:43Z")

</div>

Are you able to reproduce this in our examples at all?  
I have just tested, using the 3D example, by moving the event and then changing it to moving the listener and both produce the same effect.

You could also try attaching the FMOD Studio Profiler this can help debugging in many different ways, one of which is a 3D View which can show you where Events are in the world relative to the listener.

---

<div class="post-metadata">

**Author:** ![mgrviper](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mgrviper](https://qa.fmod.com/u/mgrviper)\
**Post date:** [July 2, 2019, 1:34pm UTC](https://qa.fmod.com/t/listener-position-or-built-in-distance-parameter-not-working-in-fmod-2-00-00-2-00-02/14815/3 "2019-07-02T13:34:54Z")

</div>

Thanks for confirmation.  
Culprit was “forward” and “up” properties of listener’s FMOD\_3D\_ATTRIBUTES.

Position in Profiler seems to be unaffected by setListenerAttributes if “forward” and “up” are not set or set with “bad” values ( for eg. forward.y = 1.f; up.y = 1.f;), but call itself returns FMOD\_OK, value preserved (can be obtainted with getListenerAttributes) and events at (0, 0, 0) are sounds alright, so i assumed that default “forward” and “up” can be used. I was wrong.
