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

fix exponential deceleration in wasd-controls (fixes #4241) #4497

Merged

Conversation

ntamas
Copy link
Contributor

@ntamas ntamas commented Feb 25, 2020

Description:

This PR fixes a problem with the implementation. of exponential deceleration in wasd-controls. The current implementation yields sudden stops when two frames are rendered in quick succession (significantly faster than the expected frame rate) and sudden jumps (in the order of several meters) in case of significant frame drops.

Changes proposed:

The velocity update has been fixed according to the Stack Overflow question originally linked in the source code.

See also the discussion in #4241.

@ntamas
Copy link
Contributor Author

ntamas commented Feb 25, 2020

Tested experimentally with the Anime UI example.

@dmarcos
Copy link
Member

dmarcos commented Feb 25, 2020

Awesome! Thanks for investigating and sharing the fix. Do you think it needs more testing?

@ntamas
Copy link
Contributor Author

ntamas commented Feb 25, 2020

I think it's fine and ready to be merged. I've tested it quite extensively in Firefox and Chrome on macOS and I doubt that it would be OS-dependent. If someone has access to Windows machines running IE / Edge, it might be worth testing it there a bit.

@dmarcos
Copy link
Member

dmarcos commented Feb 25, 2020

Cool thanks! Congrats for your first contribution 🥇

@dmarcos dmarcos merged commit 36db619 into aframevr:master Feb 25, 2020
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

Successfully merging this pull request may close these issues.

2 participants