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

Adding an examples that implements a twin stick controller, with MKB/gamepad input #414

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

AtheMathmo
Copy link
Contributor

This is a fairly complete example that uses several of the concepts present in other examples.

The main new thing is the InputMode state, which detects MKB/gamepad input and switches an app state accordingly.

I also use an ActionState Resource here, as in #413 . I can change this to a component-based approach if preferred, but I think it gives quite a nice way to handle ActionData mutation without a driver.

I also wanted to add in some visuals here (a plane, a cube, etc.). But the crate doesn't include any of those dependencies from bevy. I didn't want to add these as dev dependencies, but happy to implement this too if you think it is worthwhile.

I'm still figuring things out, so happy to make any changes as requested.

@alice-i-cecile alice-i-cecile added the example Something to do with an example label Nov 13, 2023
@alice-i-cecile alice-i-cecile enabled auto-merge (squash) November 13, 2023 14:04
@alice-i-cecile alice-i-cecile merged commit 3905f42 into Leafwing-Studios:main Nov 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Something to do with an example
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants