Directional sound does not follow listener if looking up or down

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
camera: camera.h - Google Drive

Video of the issue: Issues with directional sound - YouTube

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, 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.

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.

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.

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

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

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).

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