Godot Version
v4.4.1.stable-mono.official
Question
I have a Camera node placed under a SubViewport (the rest of the game (player, world, etc.) is not under that SubViewport). The SubViewport has a shader and the Camera renders the scene to it. When I add an AudioListener3D to my Player character and start the game, the Player’s listener does not override the Camera’s listener — the camera/listener inside the SubViewport appears to remain active. I expect the Player’s AudioListener3D to be the active listener and control 3D audio.
My running Scene is looking something like that:
Root
├─ SubViewport
│ └─ Camera Rig
│ └─ Camera3D (current)
├─ 3d World
│ ├─ Player
│ │ └─ AudioListener3D
│ └─ Audio sources, environment, etc.
└─ UI & SubViewport Texture Render
What I did:
- Put the Camera under a SubViewport. The SubViewport is used because I render some special post-process shader on that viewport.
- Left the actual game world (including the Player and AudioListener3D) in the main scene root — not inside the SubViewport.
- Added an AudioListener3D to the Player.
- Run the scene.
Expected behavior
AudioListener3D attached to the Player should become the active 3D audio listener and thus determine 3D audio spatialization (i.e., audio should be heard relative to the Player).
Actual behavior
The Camera/listener inside the SubViewport remains the active listener (or audio behaves as if the camera listener is active). The Player’s AudioListener3D does not override it.
What I’ve tried
- Making sure the Player’s AudioListener3D is enabled and present.
- Moving Player’s listener under the SubViewport — then it works as expected (but that breaks my scene organization).
- Searching for viewport audio isolation settings (didn’t find a clear setting).
Questions
- Is this expected behavior with SubViewport (i.e., do sub-viewports isolate audio listeners or make their camera/listener take precedence)?
- Is there a documented way to make a single AudioListener3D (on the Player) override any listener coming from a Camera that lives inside a SubViewport?
- Are there recommended workarounds (making the listener current at runtime, moving nodes between viewports, or other hacks)?
- Is this actually a bug?