Skip to content

Bevy input lag vs egui for GUIs #7599

Answered by nicopap
DKolter asked this question in Q&A
Discussion options

You must be logged in to vote

There is several things you can do to reduce lag:

  • Use bevy framepace It's basically a free latency reduction
  • Order your systems carefully so that the system responsible for moving the piece runs after the system to select the piece etc. This is very important.

Setting component values

Another source of latency is inserting/removing components. If you are updating a component's value, you should be using a Query<&mut MyComponent> instead of commands.insert(MyComponent).

Commands are applied at the end of a stage, so if you have a system that sets MyComponent, and another that read its value in the same stage, the reading system will only be able to read the value of MyComponent from last…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by DKolter
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants