-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Device Input System - Step 1 #7920
Device Input System - Step 1 #7920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool so far!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a Playground or something that consumes and tests this? Seems fine enough as an intermediate step, but having some end-to-end, even a hacked-up one, would provide good validation that this does everything it intends to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, otherwise looks good.
This PR contains the web implementation for the DeviceInputSystem class. This class will take input from gamepads, mice, and keyboards and allow someone to access (via pollInput) their input values in the same manner.
While it isn't the full version of this system, it's the first step. I'd like to get it checked in so that I can get feedback to create a solid foundation for the next level up on this system.
To use:
Create a variable to hold the device input system and use onDeviceConnected and onDeviceDisconnected to provide custom behavior.
Example:
Note: This code is not expected to be used by end user but by another system.