- Home /
Touch phase changes to Ended before I take my finger off the screen (Cardboard)
Hey everyone,
I'm trying to create a system to fire an event when you hold your finger on the screen for more than 1 second. Should be pretty simple except the phase of the current touch is not correct.
Even if I press the screen and rest my finger there, I get 3 phases changing frame after frame. It goes from Began to Stationary and Ended even though my finger is still there, pressing the screen.
I ran adb logcat and when I take my finger off the screen I can see an event being sent from the OS, but Unity is not getting it.
I tried Input.touches[0].phase and Input.GetMouseButtonDown(0) with no success.
Obs: I'm using Cardboard SDK, just to mention it.
Cheers!
Wait, are you getting this while you have Head-Tracking and whatever else plugged in? Do you have this problem when running a test project w/o cardboard? It sounds like a problem with using that SD$$anonymous$$. Does CardBoard use the touches, like touch 0 is your eye?
Get$$anonymous$$ouseButtonDown is just reading from input.touches, so no need to check that. I'd check touchCount each frame and the status of all touches.
Also, maybe put "CardBoarch" in the title of the Q (is there also a tag for it?)
Answer by guto-thomas · Dec 04, 2015 at 03:02 AM
I found out: You must turn off 'Tap is Trigger' on the Cardboard script, which is attached to the parent Game Object of the Cardboard camera structure.
Your answer
Follow this Question
Related Questions
Touch Input madness 2 Answers
Android - touch a 3d object and something happens to it 1 Answer
input touch android help 0 Answers
Touch joystick tutorials ? 0 Answers
Detect if finger lifted off screen 1 Answer