I took your code and make a simple test case:
local touchObjectL = display.newRect( 100, 100, 100, 100 ) local function touchHandler( event ) print(event.x, event.y) if (event.phase == "began") then -- Store current position touchObjectL.markX = touchObjectL.x touchObjectL.markY = touchObjectL.y elseif (event.phase == "moved") then print(event.x) -- Set new position of touch object touchObjectL.x = (event.x - event.xStart + touchObjectL.markX) touchObjectL.y = (event.y - event.yStart + touchObjectL.markY) end return true end touchObjectL:addEventListener("touch", touchHandler)
And it produced this on my iPad 4 running iOS 10.1
Dec 03 10:33:57.304 [Device] 129.53125 135.9375
Dec 03 10:33:57.304 [Device] 129.53125
Dec 03 10:33:57.371 [Device] 129.296875 135.9375
Dec 03 10:33:57.371 [Device] 129.296875
Dec 03 10:33:57.404 [Device] 129.0625 135.9375
Dec 03 10:33:57.405 [Device] 129.0625
[Device] 128.828125 135.9375
[Device] 128.828125
Dec 03 10:33:57.440 [Device] 128.59375 135.9375
Dec 03 10:33:57.440 [Device] 128.59375
Dec 03 10:33:57.571 [Device] 128.359375 135.9375
Dec 03 10:33:57.571 [Device] 128.359375
Dec 03 10:33:57.600 [Device] 128.125 135.9375
Dec 03 10:33:57.600 [Device] 128.125
Dec 03 10:33:57.644 [Device] 127.890625 135.9375
Dec 03 10:33:57.644 [Device] 127.890625
Dec 03 10:33:57.673 [Device] 127.1875 135.703125
When I tried this on my iPhone 6, I got results that are strange, but for the purpose of this post the strangeness is a red herring. What is important is that I got incremental values unlike your tests where you show that the value basically blocks for a bit before the change, on the iPhone 6 and iPad 4 I was getting incremental values.
Can you try the code above?
What is your config.lua like?
What version of iOS are you running on your phone?
Rob