Where is the spatial listener? (3d audio)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nuno Donato
:warning: Old Version Published before Godot 3 was released.

Hi all!

So I added a few spatialstreamplayers in my 3d scene, which - I assume - are played and listened to according to their 3d position.

My question is, where is the listener placed? There doesn’t seem to be a node for it, so what position is considered for 3d audio? Could it be the active camera?

thanks!

:bust_in_silhouette: Reply From: Hinsbart

Yes, as far as I know it’s based on the current camera.

:bust_in_silhouette: Reply From: Calinou

It appears you can choose which viewport is used as sound listener. See the class reference of Viewport.

:bust_in_silhouette: Reply From: SilvanaBanana

In Godot v3, there is a “Listener” which you can add to the 3D Scene. In the inspector, you have to check “Current” and then the Audio is rendered from this listener’s position instead of the Main Camera’s position. No need to add Viewports or extra Cameras.

https://docs.godotengine.org/en/stable/classes/class_listener.html