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

Basic mappable motion gesture #13107

Merged
merged 1 commit into from
Aug 29, 2021
Merged

Conversation

iota97
Copy link
Contributor

@iota97 iota97 commented Jul 9, 2020

Was testing if some gesture could make sense for control mapping and swipe/drag seem pretty nice for camera.

Still a draft, but as someone might have some idea/suggestion I'll just place it here if you don't mind.

@Saramagrean
Copy link
Contributor

Hi. Can you make the analog buttons not combined with the swipe gesture screen? I try with Monster Hunter, when walking with analog buttons, the camera angle rotates while swiping the screen. sorry for my english not good. 😂

Example video.
https://youtu.be/VGlAbYIsiRQ

@iota97
Copy link
Contributor Author

iota97 commented Aug 4, 2020

I can't reproduce it on neither my PC nor my phone, usedPointerMask should prevent other button press to drag the camera.

You may try to comment out any usedPointerMask = 0; when it input is TOUCH_RELEASE_ALL as that is the only part I can think could broke the check, but I don't see any reason for it to happen...

I'm kinda puzzled TBH on this.

@Saramagrean
Copy link
Contributor

Oops, my bad. I missing add code in some line. It work well now. thanks!

@iota97 iota97 force-pushed the touch-gesture branch 3 times, most recently from 859de98 to d5e06c7 Compare August 4, 2020 16:46
@iota97 iota97 marked this pull request as ready for review December 1, 2020 07:35
@ghost
Copy link

ghost commented Jul 28, 2021

How about this now?

@hrydgard
Copy link
Owner

hrydgard commented Aug 3, 2021

Not fully understanding what exactly this is or how it's used - can you extend the PR description a bit?

@iota97
Copy link
Contributor Author

iota97 commented Aug 4, 2021

This add a screensized button that handle every input on the screen that is not already handled by other touch button and use it for 2 touch gesture: swipe (with smoothing using the same logic of the mouse input) and a double tap.

The 4 swipe direction and the double tap can be mapped to PSP button.

Not sure if is worth the complexity of bitmasking the touch pointers tho' :)

@iota97
Copy link
Contributor Author

iota97 commented Aug 16, 2021

I think this is not worth the complexity in the end, closing.

@iota97 iota97 closed this Aug 16, 2021
@unknownbrackets
Copy link
Collaborator

I haven't tried this but I think it makes sense for some games. For example, I can imagine swipe right is X and swipe left is O, which could be convenient for a game with longer dialog sections. It'd be convenient in that case maybe to keep the controls hidden if a swipe is detected, though, which might be a bit complex.

The implementation looks relatively clean here. I know I commented about "stealing" the views in the other PR but definitely not a general comment on your PRs which I think have been interesting and useful, and are appreciated.

Hadn't really commented on this one yet because I've found Android more and more annoying to deal with, and it wasn't really what interested me in contributing to PPSSPP in the first place. I haven't really been using touch controls much for a while in PPSSPP, so I didn't want to give unfounded opinions.

-[Unknown]

@iota97
Copy link
Contributor Author

iota97 commented Aug 17, 2021

I didn't really like the idea of ending up bitmasking input pointer (a bit afraid of bugs given we have some weird stuff already like when 3 finger get the input stuck with android system gesture enabled for some reason), but I guess there can be some utility in this (I'll reopen for now).

About "stealing" views I knew it probably wasn't a clean implementation, I just wanted to give it a try out of curiosity and insomnia :P

@iota97 iota97 reopened this Aug 17, 2021
@hrydgard
Copy link
Owner

Not against this at all, sorry I kind of lost track of it.

I'll try to play around with it soon and most probably merge.

@hrydgard hrydgard added this to the v1.12.0 milestone Aug 17, 2021
@hrydgard hrydgard added the Input/Controller Input and controller issues label Aug 17, 2021
@hrydgard
Copy link
Owner

For a future version of this I think it would be cool if swipes could be mapped to all the virtual keys, and that you could simply input swipes when mapping controls in the control editor. That may require a bit of a rework of the mapping system though...

I'm OK with this as is.

@hrydgard hrydgard merged commit 1d29060 into hrydgard:master Aug 29, 2021
@iota97 iota97 deleted the touch-gesture branch August 29, 2021 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input/Controller Input and controller issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants