-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow tilt input on Z instead of X #12530
Conversation
Yeah, makes sense. Also not sure how to name it though :) |
Why name it? Couldn't this be automatic? I don't understand why can't the axis for movements always be relative to the direction the screen is facing, or a default option for that at least (i suppose some games might have weird required movements that move the screen to something not facing the player). edit: ok, if the tilt would change the facing direction (ie, not like a steering wheel) it would be functionally the same as a non-op if it was 'always updating', but there may be a solution to that with thresholds. |
Added a third option (auto-switch) that change mode if it detect a big change in orientation, it seem to work fine on my phone, also having a multi-choice seem better at explaining what the setting does. |
Fix #10515 |
Anything else you want to squeeze in here? I'm inclined to just go ahead and merge this, it's useful functionality. |
The button masking is not perfect: it allow you to press a button controlled by tilt with touch as well, but it can be released by tilt even if it was pressed with touch in first place. That the only thing i think it's left in case is needed. EDIT: |
Now it will not reset a button that was held when the tilt enable and then disable it. If a button get pressed when it was also enabled by tilt, tilting back will release it even if the button is still hold on touch screen. That's the last part that itches me, if you think is not worth going around that you may just go ahead and merge. |
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.
I think if we end up counting the buttons pressing/not pressing inputs, we'll end up with bugs to fight when things are released/etc. That doesn't necessarily mean we shouldn't, but it's definitely a road of complexity.
It looks like this at least doesn't release buttons that are held before and after the tilt.
I guess even combo buttons have this problem, in theory. Haven't really seen people complain about that though, so maybe it's not as much of a problem...
-[Unknown]
By using Z accelerometer axis it's possible to play when the phone screen is not parallel to the ground but rather perpendicular to it, making it easier to controll it from standing or sitting position.
I am totally lost about how to name such an option tho'.
Edit: Fixes #10515 and fixes #12620