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

default controllers seem laggy/broken in different ways on current mobile browsers #12

Open
Cloven opened this issue Sep 15, 2015 · 5 comments

Comments

@Cloven
Copy link

Cloven commented Sep 15, 2015

When I load the 'platform' test scene, on latest Chrome on an Android phone, the A/B buttons are sticky and do not get reset until another button elsewhere on the pad is pressed (e.g. the d-pad).

On an ipad, the jump buttons are not sticky (they return to an unpressed state), but ~15-30% of inputs seem to be lost.

Interestingly, when I load the 'touch' test scene, both devices show smooth, generally non-laggy, loss-free tracking of the finger moves.

The server in these cases is the most recent HFT, running on OSX, with latest HFT plugin running in Unity 5.1.1f. If there's any other debugging info I could provide, happy to help.

@greggman
Copy link
Owner

Try this.

sudo nano /Applications/HappyFunTimes.app/Contents/hft/public/css/controllers.css 

Look for

* {
    box-sizing: border-box;
    -moz-box-sizing: border-box;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}

delete the cursor: pointer; line. Go to the beginning of the line and press Ctrl-K

Then press Ctrl-X, Y, Enter to exit nano and save. Does that help?

That's the only thing I can think of so far. I noticed the screen is changing color when you press the buttons. It turns out that cursor: pointer setting was making that happen. Otherwise I don't see any lag or stickyness on my Nexus 5 nor my cheap crappy Huawei Prism II.

I'm on Chrome 45.0.2454.84 on my Android devices

If that fixes the problem I'll put up a new version

@huika
Copy link

huika commented Feb 5, 2016

I´ve noticed a behavior that might help handle this problem.
The button only get stuck if it is pressed and released without a small amount of movement on the finger position.
If you keep the button pressed and move the finger inside the button area, and only then remove the finger, it aways identify its removal and the button correctly gets released.

Update:
As far I´ve discovered, removing the handleButtonEnter addPointerId function call (touch.js) avoid the buttons from getting stuck, but obviously it also removes the possibility of touching a button with a finger that moved inside it´s area.

@greggman
Copy link
Owner

greggman commented Feb 6, 2016

Hey there. Sorry you're running into so much trouble. Are you seeing this on both iOS and Android or just one or something else?

I'll try again in Android

@huika
Copy link

huika commented Feb 6, 2016

Hi there! No problem at all, HFT is amazing :)
I'm only getting this problem on android samsung s4 mini, it's not happening on my iPad retina display, I didn't tested on iPhone.
I bet that somehow both buttonEnter and ButtonPressed/down are feeding the finger index at the same time, and the button end up considering it's being pressed by two different fingers, but I have no idea how this could happend, as I see you check if the finger index is already used.
Thanks a LOT for this amazing project :)))

@greggman
Copy link
Owner

Can you try installing version 0.0.46?

http://superhappyfuntimes.net/install

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

No branches or pull requests

3 participants