Spatial sound - listener orientation & audioListenerPositionProvider

Listener orientation doesn’t get updated when using the audioListenerPositionProvider

Steps to reproduce:

  1. Move left and right inside of the closest sphere - the spatial sound should be ok
  2. Turn 180 degrees
  3. Move left and right - the spatial sound is reversed (not updated)

Without the audioListenerPositionProvider part, it works as expected - correct orientation with any camera rotation

It is not really a but a rather pretty annoying missing behavior…

Basically, if you chose a custom position, there is no way for the framework to know the orientation to set.

In the cases where the previous function has been used, it was not an issue but I agree it is a concern in the general case.

Would it be ok for you if I also add a custom orientation Provider so you could pick the orientation you want ???

@sebavan makes sense, and yes it would solve the issue, thanks!

Should be ok with Add audioListenerRotationProvider by sebavan · Pull Request #13375 · BabylonJS/Babylon.js · GitHub