I made input for android and when i bundle my game for android the game detects multiple touches and my game object that i touch shakes. How to detect position only from my first touch?
Check for:
if action.pressed and not action.repeated then
And how to detect multiple touch. For example i want to rotate object when player put 2 fingers on the screen. I tried action.tap_count == 2 and this didnt worke.
Multiple touches are sent in a table with each touch separately. The number of touches are the same as the number of entries in the table, i.e #action.touch
See http://www.defold.com/manuals/input/ and “Multi touch triggers”. If you print the contents of the action.touch table you’ll see what’s there:
pprint(action.touch)