Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D audio doesn't work #285

Open
sergioabreu-g opened this issue Dec 4, 2024 · 2 comments
Open

3D audio doesn't work #285

sergioabreu-g opened this issue Dec 4, 2024 · 2 comments

Comments

@sergioabreu-g
Copy link

I can't seem to make 3D audio work in any way. I have a very simple setup: a Camera with a child FmodListener3D and a node that creates an event instance, sets its 3D attributes to its global transform, and starts its. It doesn't matter whether I move the event node or the camera, I either don't hear the sound at all or hear it a constant volume, depending on the distance factor I set in the project settings. I have also tried using an FmodEventEmitter3D instead of creating the event from code with the same result.

I downloaded the demo project to see if it was my problem, but it wasn't even compiling, I had to replace the FMOD addon with the latest release and fix a line of code in rollingball.gd to make it work. Even then, the 3D audio isn't working, I can't hear anything. The 2D demo project works fine.

I was trying to switch from Alessandro's addon to this one since it's actively being developed and we'll be shipping our game in a few months, but I'm actually going to stay with the former. I've run into a lot of issues with this addon while Alessandro's seemed to worked flawlessly. I don't say this to diminish your work, just to let you know that there's another implementation out there that's working nicely, though not actively developed, maybe you can take some ideas from their code.

@CedNaru
Copy link
Member

CedNaru commented Dec 4, 2024

What are the distance factor you tried ?
For 2D, it should be 64 (64 pixels = 1 virtual meter)
For 3D, it should be just 1.

If left to a value too high in 3D, FMOD will see your listener as being extremely close to the emitter all the time and the sound won't decrease with distance and be equally heard from both directions.

We are also aware of Alessandro's addon and talk to him multiple times. We are currently trying to solve as many instabilities as we can.

@sergioabreu-g
Copy link
Author

sergioabreu-g commented Dec 5, 2024

I tried a lot of different distance factors, from 0.001 to 1000, it either doesn't sound at all (no matter how close I move to the object), or it always sounds. As I said, I also can't hear anything in the 3D scene of the demo project, while the 2D scene works just fine, so I don't think this is a problem with my project's configuration. I'm using Godot 4.3.stable on Linux (Pop!_OS 22.04 LTS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants