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

NAN if dt is high in headset_simulator #760

Closed
nensanders opened this issue Mar 17, 2024 · 1 comment
Closed

NAN if dt is high in headset_simulator #760

nensanders opened this issue Mar 17, 2024 · 1 comment
Labels
bug uh oh

Comments

@nensanders
Copy link

vec3_lerp(state.velocity, velocity, 1.f - expf(-MOVESMOOTH * state.dt));

When restarting on a simulated headset platform the dt can become so high that this line produces a NAN, which breaks rendering further down the line.

I would suggest clamping it at the start of the function.

@bjornbytes
Copy link
Owner

Ah, I had already fixed this in #727, but it hasn't been merged yet. This was actually caused by a negative dt resulting from forgetting to reset the timing variables properly. I applied the fix to the stable/dev branches. Thanks!

@bjornbytes bjornbytes added the bug uh oh label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug uh oh
Projects
None yet
Development

No branches or pull requests

2 participants