How can i make detection that my two fingers are on the screen?

i try to make detection of my fingers on the screen. When i use “tap_count == 2” nothing happened.


What is tap_count? I don’t see it declared anywhere?

The action argument has a action.touch array in case of multitouch, so maybe exchange tap_count == 2 with #action.touch and go from there?

In documentation exist variable tap_count

Then it should be action.tap_count you are looking for!

I changed my script and it didnt detect double touch.

My recommendation is to add a print(action_id) and pprint(action) to see what input the game actually gets.

2 Likes

See the Input manual, which has an example. http://www.defold.com/manuals/input/#_on_input