|
We have a game on the Android Market and it is plagued by an issue with the touch input. In the game you have to hold the accelerator button to drive. The problem is that after 32 seconds (on my device) all touches get cancelled. This is a known issue as some reviewers have given us a bad review on the market for it. This page was all I could find on the internet about it: http://www.xoomforums.com/forum/motorola-xoom-general-discussion/4638-touch-input-timeout.html This means that after you have held down the accelerator for 32 seconds, it cuts off and you have to press it again to continue driving. I have tested this in a completely blank project so I know it's not our project at fault. You can try it for yourself: Just dump this script in an empty scene, run it on Android and hold the screen for 32 seconds or so. If your phone has the same issue, the touch count will reset itself to zero, cancelling all active touches. function OnGUI() { GUILayout.Label("Touch count " + Input.touchCount); }
(comments are locked)
|
|
Depends on how your code is implemented. A good approach would be to to only react on certain touch phases. I.e. start accelerating if If an I tried something similar to this already but there were a couple of problems. The first you already mentioned is where the end phase is never fired when the touch is cancelled. The accelerator will essentially be "stuck" down until the player lifts their finger, touches the screen, then lifts their finger again. The second problem with is that when the first touch is cancelled, any subsequent touch becomes the first touch. So I am holding the gas, it gets cancelled by the OS, I press another button which overwrites the first one and the gas gets cut off. If this is a problem with the Android OS I am surprised there is not more information about it. I have done a lot of searching on Google and found nothing.
Jan 04 '12 at 01:19 AM
Eugene
Anybody? This is kind of a deal breaker.
Jan 21 '12 at 10:31 PM
Eugene
(comments are locked)
|
|
if Input.touches[0].phase==TouchPhase.Canceled, intelligently persist the EFFECT of the touch using the coordinates of the canceled touch. Remove the effect of cancelled touch if total touchcount becomes > 1 as that means they have touched somewhere else. The accelerator will essentially be "stuck" down in this state.
Feb 06 '12 at 09:43 AM
Eugene
Well then I guess you have to incorporate this into your gameplay somehow. Acceleration lock = hyper speed. :)
Feb 06 '12 at 06:00 PM
buffonomics
I think I'm going to submit a bug report to Unity. I think this is actually a problem with the Android OS itself but there has to be some way to fix it.
Feb 06 '12 at 06:20 PM
Eugene
I don't think Unity can do a thing about it if it's an Android OS bug. Unity is simply a layer on top the OS and reports to you what the OS tells it. You would be better served submiting a bug to Google :)
Feb 06 '12 at 06:32 PM
buffonomics
(comments are locked)
|
