I see a lot of potential uses for the Gesture Recognizer plugin. I think I understand the basic gesture recognition tables but I’m not really understanding how the numbers work for complex gestures.
From the basic layout it seems that the first nested table is the negative x/y values and the second nested table is the positive x/y values.
Basic
[lua]
local recognizer = gesture.newRecognizer({
down = { { 0, 0 }, { 0, 1 } },
left = { { 1, 0 }, { 0, 0 } },
right = { { 0, 0 }, { 1, 0 } },
up = { { 0, 1 }, { 0, 0 } }
})
[/lua]
In the complex example there seems to be ratios for the x/y values (OK) but also an odd number of nested tables which doesn’t make sense to me with regard to my previous assumptions about positive and negative x/y values.
Complex
[lua]
local recognizer = gesture.newRecognizer({
complex = { { 3, 1 }, { 0, 1 }, { 2, 2 }, { 3, 0 }, { 1, 2 } }
})
[/lua]
I’m hoping to recognize gestures like squares, circles, and letterforms.
Any explanations, samples, or help deciphering the tables/values would be appreciated.
Thanks,
Jonathan