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 mouse accumulation #543

Merged
merged 21 commits into from
Jun 18, 2024
Merged

Fix mouse accumulation #543

merged 21 commits into from
Jun 18, 2024

Conversation

alice-i-cecile
Copy link
Contributor

@alice-i-cecile alice-i-cecile commented Jun 11, 2024

Fixes #538.

After substantial investigation, an upstream fix (that didn't end up being needed) and some serious refactoring, mouse motion and mouse scroll inputs tests are all green.

Basically, rather than summing the inputs in the middle of computing the raw inputs for each action, we're computing it once, in preupdate, and then fetching that value as a resource. This, unsurprisingly, should be upstreamed to bevy_input rather than living in LWIM.

@alice-i-cecile alice-i-cecile marked this pull request as draft June 11, 2024 15:15
@alice-i-cecile alice-i-cecile added bug Something isn't working blocked Nothing to do yet labels Jun 11, 2024
@alice-i-cecile
Copy link
Contributor Author

There are two paths forward with this PR:

  1. Wait for the upstream fix to be merged, which should make this patch work as is.
  2. Swap to a resource which accumulates mouse motion / mouse wheel scroll and just read that.

The second is probably better, to avoid repeated wasted work.

@alice-i-cecile alice-i-cecile removed the blocked Nothing to do yet label Jun 12, 2024
@alice-i-cecile alice-i-cecile marked this pull request as ready for review June 18, 2024 19:08
@alice-i-cecile alice-i-cecile enabled auto-merge (squash) June 18, 2024 19:57
@alice-i-cecile alice-i-cecile merged commit 7cc1a52 into main Jun 18, 2024
4 checks passed
@alice-i-cecile alice-i-cecile deleted the mouse-accumulation branch June 18, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mouse movement accumulation is broken
1 participant