“touch” and “multi_touch” seems to be different in regards to dx/dy and screen_dx/dy as the multi_touch version seems to be wrong in some cases.
Repro steps:
function on_input(self, action_id, action)
if action_id == hash("touch") then
print("touch result: ")
pprint(action)
end
if action_id == hash("multi_touch") then
print("multi_touch result: ")
pprint(action)
end
end
Output will differ if you press one finger on the screen and move it slightly and then hold in steady in one place. This was reproduced with a Samsung Galaxy S2.
My output from a bugged entry:
DEBUG:SCRIPT: touch result:
DEBUG:SCRIPT: pprint: {
“x” = 519.75006103516
"screen_dx" = 0
“pressed” = false
“y” = 741.60003662109
“screen_y” = 464
“acc_y” = -0.52083331346512
“acc_x” = 0.084722220897675
“screen_dy” = 0
“acc_z” = -0.86944442987442
"screen_x" = 346
“dx” = 0
“value” = 1
“repeated” = false
“released” = false
“dy” = 0
}
DEBUG:SCRIPT: multi_touch result:
DEBUG:SCRIPT: pprint: {
"screen_dx" = 1
“x” = 519.75006103516
“touch” = [table: 0x58280650]
{
1 = [table: 0x58280690]
{
“x” = 519
“tap_count” = 0
“pressed” = false
“y” = 741
“dx” = 1
“released” = false
“dy” = 1
}
}
“pressed” = false
“y” = 741.60003662109
“screen_y” = 464
“acc_y” = -0.52083331346512
“acc_x” = 0.084722220897675
“screen_dy” = 1
“acc_z” = -0.86944442987442
"screen_x" = 346
“dx” = 1.5000001192093
“value” = 1
“repeated” = false
“released” = false
“dy” = 1.5999999046326
}