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
TouchScreenGUI: Read coordinates directly for virtual joystick #13567
Conversation
…or virtual joystick The movement's direction and speed are calculated directly from the button's screen coordinate. The only virtual joystick status left is Aux1 button.
This is definitely an improvement to the user experience. I tested this PR both with and without The code also looks good. The only problem I see is that it removes physical joystick support on Android, but I doubt anyone is using a physical joystick on Android, and joystick support seems to be quite broken anyway. EDIT: Another small thing: srifqi#1 |
I got the build from "Actions" here, but it lead to the irrlicht crash, does anyone have a build to test this or is a rebase enough? Edit: a rebase won't do (?). |
A rebase won't help, all Android builds will be broken until the IrrlichtMt revision is bumped. That's because the Android build downloads a pre-compiled IrrlichtMt. The only way to get a working build is to compile IrrlichtMt yourself. EDIT: |
bb8dec5
to
c5645c0
Compare
Should I use the #ifdef HAVE_TOUCHSCREENGUI
if (!g_settings->getBool("enable_joysticks"))
return m_receiver->m_touchscreengui->getMovementSpeed();
#endif
return joystick.getMovementSpeed();
I attached the APK builds in the first post with the recent IrrlichtMT build (09af5ac). |
IMO no |
Just to make the available information more complete: Physical joysticks don't seem to be supported at all on Android at the moment, as Irrlicht doesn't support them on Android. |
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.
LGTM
…est#13567) The movement's direction and speed are calculated directly from the button's relative screen coordinate. The previous method was to trigger the movement using a keyboard event. The only virtual joystick status left is Aux1 button. --------- Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
Goal of the PR
This PR makes the input handler to use virtual joystick's coordinate directly instead of using keyboard event so that the movement can be smooth and not limited to 8 direction and full speed.
YouTube video
How does the PR work?
The movement's direction and speed are calculated directly from the virtual joystick button's screen coordinate.
The only virtual joystick status left is for Aux1 button (used if
virtual_joystick_triggers_aux1
is enabled).Does it resolve any reported issue?
This PR tries to fix #12436.
Does this relate to a goal in the roadmap?
Probably, this PR tries to fix a reported UX issue.
To do
This PR is a Ready for Review.
How to test
virtual_joystick_triggers_aux1
.Android: APK builds