-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Touch input support #300
Comments
I will say I like that Godot can optionally emulate mouse events from touch events or vice-versa. But as long as those events are implemented well separately, it shouldn't be too hard to make an optional system that translates them. |
Yeah, I agree that there should be an easy way to treat them equally for simple games that just need some "basic pointer input", but that should be a separate kind of input event. I really don't like when this is baked into the underlying input system, rather than implemented on top of it. Independent first-class support for the different input devices should be the primary focus. Touch and mouse each offer unique features and it should be possible to make full use of them. Games designed for touchscreen in mind (important if we want bevy to become viable for mobile and web games) should be able to take full advantage of multitouch, etc. without having to deal with anything to do with the mouse. And vice versa for desktop games designed for mouse input with multiple mouse buttons, scroll wheel, etc., which might not want to work with a touchscreen. As for the "basic pointer input", this use case is already be partly covered by the |
We could go through all the input events that winit and SDL2 can produce and make a list of the ones that we want and decide how to abstract them. Could do the same for windowing as well. |
This is a concern, but there are more important blockers atm. |
"More important", sure, but is it really a blocker? |
Yeah, touch input is not limited to mobile. My laptop and many of my friends' laptops nowadays have touchscreens and it is great when software can support touch input properly. I certainly care about it and want to develop things with touch support. |
Regarding the Godot options for emulation of mouse from touch and vice versa. It's actually an annoying hack that does more harm than good when you want to support devices with touch input. Instead, the base UI controls (buttons) should support both Mouse and Touch events. In such case, there would be no need in translating them. And multi-touch would work seamlessly as the base controls would distinguish between finger indexes. |
Relevant blog post on Event Chaining as a Decoupling Method in Entity-Component-System by @Jojolepro |
resolved by #696 |
We should add support for multi-touch touchscreen input.
EDIT: this should be independent of the mouse or mouse input. They are not the same.
The text was updated successfully, but these errors were encountered: