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

Infinitely far away AudioStreamPlayer2D's mute all audio while playing. #70950

Open
Tracked by #76797
API-Beast opened this issue Jan 5, 2023 · 2 comments
Open
Tracked by #76797

Comments

@API-Beast
Copy link

Godot version

3.5.1

System information

Windows 10

Issue description

If a AudioStreamPlayer2D has a impossible position such as Vector2(INF, 0) it will overwrite and mute all audio until playback is finished.

Steps to reproduce

Create a Scene with a looping sound.
Add a AudioStreamPlayer2D, set it's global position to Vector2(INF, 0).
Play the AudioStreamPlayer2D.

Minimal reproduction project

ReproduceInfDistanceAudio.zip

@KoBeWi
Copy link
Member

KoBeWi commented Jan 5, 2023

Sounds related to #46204
Can't reproduce in 4.0

@KoBeWi KoBeWi added this to the 3.x milestone Jan 5, 2023
@AThousandShips
Copy link
Member

AThousandShips commented Jan 5, 2023

It seems to be caused by that by setting the local position to (INF, 0) you get a global position of (INF, NAN), making the distance check fail, then causing the issue in #46204. Was at first confused as the distance should be INF if the position really was (INF, 0).

Maybe more checks should also be made NAN proof, so for a distance of NAN the result should treat it as too far away.

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

No branches or pull requests

4 participants