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

User input during playback is also used, and messes up the playback #13

Open
alice-i-cecile opened this issue Oct 4, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@alice-i-cecile
Copy link
Contributor

What you did

Ran the input_playback example.

What you expected to happen

No user input would be accepted during playback, and I get a perfect recording.

What actually happened

The input that I entered was also applied, messing up the results.

@alice-i-cecile alice-i-cecile added the bug Something isn't working label Oct 4, 2022
@alice-i-cecile
Copy link
Contributor Author

We probably need to fix this upstream somehow, and add a way to toggle user input dynamically.

@bzm3r
Copy link
Contributor

bzm3r commented Oct 4, 2022

Note: this is different from how one might disable user input during a cutscene. In situations like that, you can simply disable the system that responds to user input, effectively ignoring it.

Here, we want to ignore user input completely.

@snendev
Copy link
Collaborator

snendev commented Aug 22, 2024

has anything on the bevy side changed here since 2022?

from a short bit of code delving in the bevy repo, it seems like either:

  1. bevy_input needs to provide some control for differentiating the "sources" of inputs (winit vs something else, would need to be provided at event construction which makes the types more complicated)
    or
  2. bevy_winit needs to provide an off switch for forwarding certain events

neither of these feels good to me right now.

(just posting here since I'm thinking on it -- I'll raise a question in the discord if I don't get anywhere.)

@alice-i-cecile
Copy link
Contributor Author

Yeah, not much has changed here. I think you could add some carefully timed event draining systems and get this to work without any changes upstream though.

@snendev
Copy link
Collaborator

snendev commented Aug 22, 2024

I think you could add some carefully timed event draining systems

Great point. playback_timestamped_input can occur in PreUpdate after InputSystems and a drain system, and it shouldn't really change much else. Will implement after the refactor PR is figured out so I don't have to re-do all the system configuration. Thanks!

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

No branches or pull requests

3 participants