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

IOS touch controls problems. #5099

Closed
brujo5 opened this issue Jan 14, 2014 · 25 comments · Fixed by #14186
Closed

IOS touch controls problems. #5099

brujo5 opened this issue Jan 14, 2014 · 25 comments · Fixed by #14186
Labels
Milestone

Comments

@brujo5
Copy link

brujo5 commented Jan 14, 2014

this problem still appears in recent build since very long time.controls remain pressed when touched simultaneus buttons.

@hrydgard take a look on this,please.

img_0013

@hrydgard
Copy link
Owner

I can't reproduce this on Android (I don't have an iOS dev setup).

@brujo5
Copy link
Author

brujo5 commented Jan 14, 2014

to bad.

@adrian17
Copy link
Contributor

iPhone 4, 0.9.6-406, I also can't reproduce this.
However, I can see a similar issue - if you pause the game (either on phone or on the computer with the Esc key) while pressing a touch button or a key, after unpausing the key will remain "pressed", until you actually press it again. Was this issue mentioned anywhere? It looks like an easily noticeable problem, but I haven't found any mention of it.

@unknownbrackets
Copy link
Collaborator

Actually, that problem exists on all platforms. Pretty sure there is an issue for it.

-[Unknown]

@brujo5
Copy link
Author

brujo5 commented Jan 14, 2014

yeah,sometime remain pressed the analodg stick to.

also is most apreciable in fighting games like smackdown vs raw 2011 or dbz vs tag.is hard to play when happend.

@ghost
Copy link

ghost commented Apr 1, 2017

Well,it's 2017,4,1 now,and I sometimes meet this issue still

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Apr 12, 2017

Here's what I suspect is happening (see also #9570):

  1. Finger 1 touches X, and a new ID is allocated, say 0.
  2. Finger 2 touches O, and it allocates 1.
  3. Finger 1 is released, deleting the association.
  4. Finger 1 touches X again, allocating 0 again.

Now, it's important to notice this is an NSMutableArray. So it's sorted. At this point, the array is:

  • Touch 1
  • Touch 0

Now, if a finger 3 presses, what happens? It starts at 0, finds a collision, and increments to 1. It never notices the collision at 1, and there become two fingers with touch id 1.

From that point, things can become mismatched. IMHO, using a fixed size array would be more foolproof, but of course #9602 shows that must be done carefully too.

-[Unknown]

@hrydgard
Copy link
Owner

Is it still an issue?

@brujo5
Copy link
Author

brujo5 commented Mar 23, 2019

nope, thx

@brujo5 brujo5 closed this as completed Mar 23, 2019
@unknownbrackets
Copy link
Collaborator

I'll just note that I don't see anything that has changed what I described from happening. Touch indexes are still allocated in the same way that causes id collisions.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Feb 19, 2021

Report from my chinese friend
Happened when more 2 touch
https://youtu.be/uJvCwg8vqMY

@sum2012 sum2012 added this to the v1.12.0 milestone Feb 19, 2021
@hrydgard hrydgard added the Input/Controller Input and controller issues label Feb 19, 2021
hrydgard added a commit that referenced this issue Feb 20, 2021
Patterned on #9602.

Fixes #5099.

Note that the iPhone supports max 5 touches and will cancel all on the 6th touch.
That's platform behavior that can't be changed. We interpret touch cancellation
as touch up.
hrydgard added a commit that referenced this issue Feb 20, 2021
Patterned on #9602.

Fixes #5099.

Note that the iPhone supports max 5 touches and will cancel all on the 6th touch.
That's platform behavior that can't be changed. We interpret touch cancellation
as touch up.
@hrydgard
Copy link
Owner

This should be fixed now, finally. Patterned the fix on @unknownbrackets 's fix for the similar problem on Windows touch.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 20, 2021

I have told the tester retest

@sum2012
Copy link
Collaborator

sum2012 commented Feb 21, 2021

The tester said that the flicking fixed but emulator joystick sometimes don't work

@hrydgard hrydgard reopened this Feb 21, 2021
@hrydgard
Copy link
Owner

Can you get more details on the joystick problem?

@sum2012
Copy link
Collaborator

sum2012 commented Feb 21, 2021

I have told him to make another film

@unknownbrackets
Copy link
Collaborator

To me a joystick problem sounds like just a separate issue. I know we have several reported issues about iCade / non-iCade support.

-[Unknown]

@hrydgard
Copy link
Owner

Well, he might mean the virtual joystick on-screen.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 21, 2021

Yes,he mean virtual joystick on-screen,not blue teeth one.

@hrydgard
Copy link
Owner

I tested it a bit myself and I don't see any issues. When you add five more simultaneous touches it does lose tracking, but that's unavoidable and kind of an extreme edge case.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 24, 2021

https://youtu.be/Dc6gnBMDIJU
He said that this should not be a bug, but a touch screen design problem
After he released the joystick, he started to touch and slide from the outer ring to the inner ring and He couldn’t control the joystick. This was the key reason for the malfunction. No matter how he slide the joystick, he didn’t respond. He only changed his habits. After releasing it, you must start the touch from the inner circle so that it will not malfunction.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 24, 2021

This is a test video of him sliding the full screen from the middle of the screen:
https://youtu.be/kw3bAmNOT3o
For the joystick, this setting is unnecessary, because sometimes after the joystick is pulled to the edge and then released, the inner ring cannot be touched for the first time, but it slides over. This is equivalent to failure

@unknownbrackets
Copy link
Collaborator

Does the "Auto-centering analog stick" setting help under Controls?

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Feb 26, 2021

Does the "Auto-centering analog stick" setting help under Controls?

-[Unknown]
He said that no help

@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Apr 28, 2021
@hrydgard
Copy link
Owner

I don't think there are any remaining issues here, it seems to work nicely. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants