Closed moisesjpelaez closed 3 months ago
No problem! I got that same error as well when I was resizing my browser or setting it to full-screen (in Chrome). I don't know what's causing the division by zero or dopplerRatio
resulting in a negative value.
Hi, I finally had some time for this and pushed some changes at https://github.com/MoritzBrueckner/aura/commit/374800abd009398885e7eda0d40a631df12f16fc that should hopefully fix your issue. I would appreciate if you would test them and report back, thanks :)
While your PR fixed the "visible" part of the issue, the actual cause for the issue was indeed a division by zero that would happen when calculating the panner's velocity multiple times within the same time step. Apparently, resizing the browser window can trip up Kha's scheduler which provides the time, and thus the issue became evident in that case. But even without resizing, the previous behavior was problematic as a user could just update the position twice within a time step and the same would have happened.
Thank you for your patience!
Thanks! These days I'm busy with one game plus other things but I'll likely be testing it again around next month in another project.
Thanks a lot! I can confirm an issue that's related to NaN values in the doppler code which might be the same that you are experiencing, however, I'm not yet sure what exactly the cause is. I assume it is timing/framerate-related, maybe resizing the window causes a small lag that then changes the listener/source object velocities in a way that causes a division by zero, or something similar.
While your changes certainly seem to fix the error, at a first glance it looks to me like they might just fix the symptoms and not the underlying cause, so before merging this I want to spend some more time debugging the issue to really know what happens.
Do you already know more perhaps?
To make sure we're talking about the same issue: In my case, I get a failed assertion caused by
dopplerRatio
beingNaN
:(The above error comes from the debug-html5 target using Electron, but the same happens with html5 in Firefox)