-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Inputs are not processed correctly if key repeat rate is faster than FPS #5909
Comments
I have a feeling this is related to |
Found this related issue from |
Someone else had the same problem with |
Maybe something like https://github.com/rukai/winit_input_helper could be used? |
I suspect this is the same problem as in #4664 |
Are there any updates on that? I am experiencing a simillar problem and would like to fix it somehow. |
I've just started tinkering on a new project using Bevy and I've immediately run into significant input lag. It seems there are enough related issues with different root causes that I'll probably end up trying a bunch of different things that people have suggested in issues here to discover which issue or issues are the ones affecting me. That's okay. I can do that. However... It feels like input lag in general is likely to be an ongoing issue for a lot of other people, too, so I can't help but think it might be worth putting together some kind of diagnostic tool to help people quickly and precisely understand what's going on in their case. I'm imagining something that can take measurements by itself rather than having to rely solely on user-perceived lag. To do this meaningfully I'm imagining things like:
I don't know how much of this is possible. I guess I have some reading to do. Is anybody already working on something like this? |
Consolidating with #5984. |
Bevy version
0.8.1
[Optional] Relevant system information
Mac OS Monterey 12.5.1
What you did
I have my key repeat rate set faster than normal, by following this StackOverflow thread, specifically:
What went wrong
When I am running any Bevy game where FPS is locked (via PresentMode::Fifo or VsyncAuto), input seems to buffer up, so that when I release e.g. the arrow key, the character keeps moving for several seconds.
If I change the KeyRepeat back:
Then this does not happen (although there is still a tiny bit of lag, see #3317)
Additional information
When I set
PresentMode::Immediate
it mostly works as expected, although some times the FPS is still locked to screen refresh rate, though that is a separate issue (And in these cases, the exact same problem as described above is present).The text was updated successfully, but these errors were encountered: