1
\$\begingroup\$

So, if you can picture a game with little ninjas running down at you, and a bunch of shurikens at the bottom of the screen, you're picturing the set-up I'm addressing.

I want the player to be able to flick the shurikens up at the ninjas, but I want them to be able to do it with both thumbs at the same time. Gesture recognizers seem to be the way to do this, but I'm not sure which is the most appropriate. The main ones that seem to fit are the pan gesture and the swipe gesture.

Does anyone have insight into the pluses and minuses of each, or even if a better one exists?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Try it? Input feel is really an iteration thing IMO... \$\endgroup\$ Commented Jul 31, 2013 at 14:42

1 Answer 1

1
\$\begingroup\$

A swipe gesture is a kind of pan gesture. Both gestures start and end when a touch starts and ends, but a pan gesture will track and report input continuously over the duration of the touch. A swipe gesture will "instantaneously" determine if the translation of the touch was fast enough and in the proper direction and report only once.

Consequently, you should probably use a swipe gesture to implement your shuriken-throwing. If that ends up not feeling right, you can use a pan recognizer and re-implement the "swipe detection" heuristics yourself so you have better control over them.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .