You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JustPressed becomes Pressed in a system that runs in PreUpdate (so once-per-frame).
leafwing systems do not run in FixedUpdate
lightyear handles inputs in FixedUpdate, to have access to tick information
Basically the problem is that:
if you use just_pressed in FixedUpdate: you can have frames where FixedUpdate doesn't run, so the JustPressed becomes Pressed and just_pressed() misses the input
if you use just_pressed in Update: I actually cannot remember the exact problem here.. I think it's that the tick-number in Update is not reliable. There's no guarantee that it would be the same as in the server, so you might get off-by-1 errors.
The solution to use pressed in FixedUpdate and consume the action. I think it works, but it generates more diffs than necessary (wasted bandwidth) because of some leafwing issue
Pre-requisite knowledge:
Basically the problem is that:
The solution to use pressed in FixedUpdate and consume the action. I think it works, but it generates more diffs than necessary (wasted bandwidth) because of some leafwing issue
Relevant leafwing issue: bevyengine/bevy#6183
The text was updated successfully, but these errors were encountered: