# Directional sound does not follow listener if looking up or down

**URL:** <https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [May 20, 2022, 6:16am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781 "2022-05-20T06:16:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 6:16am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/1 "2022-05-20T06:16:38Z")

</div>

Hi i am writing a university project in C and have begun to add directional sound into it, but i cant seem to be able to get it to work when looking at certain angles(up and down), sounds just stop respecting the listener’s position and orientation.

Linked with the post are the sound controller header and the camera header.  
sound controller: [globalsoundeffects.h - Google Drive](https://drive.google.com/file/d/11l29py1iMUUUrhZ33UrxATE9O6AoPlus/view?usp=sharing)  
camera: [camera.h - Google Drive](https://drive.google.com/file/d/1bG_fZCRU9uY7pMurGqhbqh87xw0wzPpR/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 6:19am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/2 "2022-05-20T06:19:13Z")

</div>

Video of the issue: [Issues with directional sound - YouTube](https://youtu.be/FQ1ILziaJxY)

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [May 20, 2022, 7:30am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/3 "2022-05-20T07:30:28Z")

</div>

Hi. I didn’t find your video very informative. It’s too long, you don’t describe where the problem occurs, and there’s mostly sounds which should probably come from the center of the screen.

However, your problem could be related to the bug I describe [here](https://qa.fmod.com/t/listeners-elevation-panning-issue/16656/10), which hasn’t been fixed yet, from what I know. Sounds coming from exactly below or above the listener (but offset on the left-right axis) are incorrectly hard panned left or right.

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 7:36am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/4 "2022-05-20T07:36:07Z")

</div>

Hello!

I thought the visuals would be clear as to what was happening apologies, but in short 3D sounds(like the footsteps and breaking/placing and jumping sounds) are meant to be spawned from the listener’s(the camera/player)'s position.  
Thus its expected for them to remain constant in volume no matter which direction the player is looking, however it seems like if the player looks up or down the sounds instead seem to behave as if their positions were fixed and thus begin to fade out based on how far the player has drifted.

This is quite strange since 1) Each sound is a newly generated instance and 2) as the HUD shows the listener’s XYZ coords match that of the player’s which in tern means the instance’s XYZ should too.

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 7:38am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/5 "2022-05-20T07:38:11Z")

</div>

I read your post, and indeed the issue seems to be similar, albeit my sounds seem to get static 3D parametres instead of panning to one channel.

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 7:40am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/6 "2022-05-20T07:40:15Z")

</div>

the idea of clamping the listener’s angle might work however, will test

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 7:43am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/7 "2022-05-20T07:43:42Z")

</div>

on some further testing i noticed the channels hard panning as well, if the player moves while looking downwards

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [May 20, 2022, 7:48am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/8 "2022-05-20T07:48:22Z")

</div>

Indeed, now that you pointed the problem, that’s weird (and not related to the problem I was talking about). There should be something wrong in the listener or event 3D attributes update. But as you say, clamping the listener’s angle could maybe work (which means not updating the listener with the up/down camera movement).

---

<div class="post-metadata">

**Author:** ![Altarya](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Altarya](https://qa.fmod.com/u/Altarya)\
**Post date:** [May 20, 2022, 9:25am UTC](https://qa.fmod.com/t/directional-sound-does-not-follow-listener-if-looking-up-or-down/18781/9 "2022-05-20T09:25:34Z")

</div>

indeed that worked, ended up allowing for a very small amount of y tilt and it worked whilst keeping some vertical directional simulation
