So I'm trying to have positional audio in my game, like when you turn on a radio the sound comes from the radio, or when you're at the top of a lighthouse you hear a song.
The problem is that every time I try to use a AudioStreamPlayer3d, it never works in game. I've tested the function of it working in separate blank projects, and it works there, however it just doesn't work at all in my game. I've tried adding a listener, I've tried already tried adjusting the distance and unit size. The weird part is that when i click the playable box to test it in viewport, it works just fine.
One thing to note is that I did start the project out with a premade first person controller, but I've already tried replacing the camera. I also opened another project with the premade first person controller, and it works there. Additionally, the normal AudioStreamPlayer works fine. It's only the AudioStreamPlayer3d that's having issues. Is there a hidden setting or piece of code I have to turn on? I've been trying to fix this issue for 3 days so any help is appreciated!
edit: i figured it out, i had the camera in a viewport node and there's a setting you have to enable in the viewport node to have 3d audio.