When scene.useRightHandedSystem = true, the spatial audio is reversed, playing sounds to the right of the camera viewport in the left speaker and vice-versa
I think this one is for @sebavan
Tentative PR:
I donāt think this worked? I have a project that is running spatial audio in a rightHandedSystem and its still got reversed panning.
The weird part is it does not do it in the spatial audio playground when you change the handiness.
Basically I can hear the fade working correctly and like its in the correct position, just in the opposite ear.
If I stand to the left of the sound and walk to the left, I hear it in my left ear and it fading correctly with distance, but that should be happening in the right ear.
@docEdub I was told to tag you as an audio wizard.
Is there maybe just a way I can attach a audio node that reverses the panning?
Ya, you can reverse the panning by connecting from a Sound objectās gain node to a ChannelSplitterNode chained to a ChannelMergerNode (with left/right channel connections swapped), and then connect it to the audio engineās master gain node.
You shouldnāt have to do that, though. It should just work correctly in Babylon.js. Iām not able to reproduce the issue in a playground, yet so Iām wondering what your project setup looks like. Are the Sound objects attached to meshes? Is the scene audioListenerPositionProvider set? Are SoundTrack objects being used? etcā¦
Can you show me an example of how to do that with the nodes? Iāve got a rather small knowledge of the audio nodes so even some pseudo code would help a ton. Ideally yeah we would not have to do that, but there are so many ins and outs to the system that its happening with that it would be nearly impossible to track down the culprit.
Ya, let me whip something up
Here you go ā¦
Awesome! Thank you so much.