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

bevy_input: fix repeated gamepad events #1221

Merged
merged 1 commit into from
Jan 7, 2021

Commits on Jan 7, 2021

  1. fix repeated gamepad events

    Previously, if the actual value of LeftStickX was e.g. 0.034 and fluctuated a little
    bit (less than the threshold) it would repeatedly send out events,
    because it compared the value to the *filtered* old one - 0.0 - which is
    more then `0.01` (the threshold) away.
    
    The is fixed by first doing the deadzone and then comparing to the old
    value.
    Another possible solution would be to store both the actual old value
    and the filtered one, but that would add complexity.
    jakobhellermann committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    2a0a040 View commit details
    Browse the repository at this point in the history