You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should probably defused right after this line (and other lines where a deltaTime is used) with something like:
deltaTime=Math.max(deltaTime,0.000001);
To Reproduce
Steps to reproduce the behavior:
Not sure, to be honest, took some time to find out, that getDelta() is allowed to return 0, it randomly occured, while moving around with the controls. It could be that update() was executed consecutively, but even then I don't think it should break the camera.
The text was updated successfully, but these errors were encountered:
Thanks - are you passing "deltaTime" in yourself? Or relying on the built in clock? Either way after testing by directly passing 0 in in a second update call it looks like this is causing an issue. I think an easy solution here is to just return early from the update function if is deltaTime <= 0 in EnvironmentControls and GlobeControls. Would you like to make a PR?
Fixed in #743. Without any more information about how this is happening in practice (update must be getting called back to back) checking for 0 seems like the most reasonable solution.
Yes it did happen with the default clock and my own clock as well. I wonder why though, as even consecutive calls of clock.getDelta() should intuitively return a value > 0, but I guess the precision of performance.now() is kinda bad (and because of all the security stuff got even worse up to > 100 us)
The merged fix is even better thanks. I checked the rest of the code-base and indeed these were the only concerning clock.getDelta() calls (as otherwise only delta * ... is done).
Describe the bug
I've noticed that in the
EnvironmentControls
, which broke the camera transform (NaN
and the likes) and other values of it.in:
It should probably defused right after this line (and other lines where a
deltaTime
is used) with something like:To Reproduce
Steps to reproduce the behavior:
Not sure, to be honest, took some time to find out, that
getDelta()
is allowed to return0
, it randomly occured, while moving around with the controls. It could be thatupdate()
was executed consecutively, but even then I don't think it should break the camera.The text was updated successfully, but these errors were encountered: