TransformGesture causes undesired FlickGesture

Ask for help and post bugs.

TransformGesture causes undesired FlickGesture

Postby sunnyhohoho » Wed Jan 03, 2018 6:36 am

Hi all,

First of of, a huge Thank You to this amazing library. I saved tons of hours (and hair) of mine :lol:

Basically, i have a board game object in the middle of the screen. and i would like to be able to do the following:

1) use transform gestures to manage the camera view, just like what you can do in google map, except panning the camera, instead it always look at the center of the game board.
2) use flick gesture to control a game object's direction on the board.

now i've already achieved this by having a screen layer set on the scene and a transform gesture handler to handle the transform gestures (with a pointers limit set to 2 exactly).
and i've also added the flick gesture handler to the board object and handle the flick gesture (pointer limit set to 1).

the board object is inside the scene object (not sure if that will make any differences?)

however, if i do a Transform Gesture quickly on the screen, I can quite easily trigger the flick gesture (even with 2 fingers). and even if I perform the transform gesture slowly, occasionally it will still trigger the flick gesture.

Is there something obvious I'm missing here?

Thanks very much in advanced.
sunnyhohoho
 
Posts: 2
Joined: Sun Dec 31, 2017 2:23 pm

Re: TransformGesture causes undesired FlickGesture

Postby sunnyhohoho » Mon Jan 08, 2018 5:51 am

Think i've got it figured out.

I mistakenly subscribed to the StateChange event instead of the Flicked event. Now it gives a more stable result.
sunnyhohoho
 
Posts: 2
Joined: Sun Dec 31, 2017 2:23 pm


Return to Help and Bugs

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest