Delays in user input #16335
-
I'm working for a week now with the Bevy game engine, and having some trouble with input delays. Both with the UI as well as directly with keyboard input. And I was wondering what I was doing wrong. It seems that there is always a few frames delay. So for now, I have the following source code:
My Cargo.toml file looks like this, for optimalisations:
I seem to have the same delays both when I compile in dev mode as well as release mode. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
I don't think this is likely to be a problem in the compiler settings: if this problem is widespread it's almost certainly a bug in winit or our integration with winit. |
Beta Was this translation helpful? Give feedback.
-
Can you say more about how you're measuring the input delay? That would be very helpful in general, but especially for others to check across different platforms. |
Beta Was this translation helpful? Give feedback.
-
I also encountered input delay problems on Windows.
App::new()
.add_plugins(DefaultPlugins.set(
RenderPlugin {
render_creation: RenderCreation::Automatic(
WgpuSettings {
backends: Some(Backends::DX12),
..default()
}
),
..default()
}
).set(
WindowPlugin {
primary_window: Some(
Window {
present_mode: PresentMode::AutoNoVsync,
..default()
}
),
..default()
}
)) |
Beta Was this translation helpful? Give feedback.
-
I upgraded my project to Bevy version 0.15. Unfortunately the bevy_framespace plugin doesn't work in this version. App::new()
.add_plugins(
DefaultPlugins.set(
WindowPlugin {
primary_window: Some(
Window {
present_mode: PresentMode::AutoNoVsync,
..default()
}
),
..default()
}
)
) |
Beta Was this translation helpful? Give feedback.
Have you experimented with https://github.com/aevyrie/bevy_framepace? Poor framepacing may be the culprit here.