Hi @corona4182,
Thanks for your notes and observations, especially that this seems to affect native-built apps as well.
I will discuss a potential solution with the engineering team. We probably will not just globally dismiss/ignore all subsequent “moved” phase events with the same x/y position, because that is (in effect) a way to actually support 3D Touch, and some developers clearly want that already. More likely, it would be a “system.activate()” setting to toggle the option on/off, and so users who did not care about using any 3D touch functionality in their app could safely turn that option off (most likely, the default would be off, and enabling it would be exception since 3D touch is isolated to only the new iPhones).
In the meantime, I think you can work around this in your own code, perhaps like this:
[lua]
local function touchListener( event )
local objTouched = event.target
if not ( objTouched.prevTouch ) then
objTouched.prevTouch = { x=event.x, y=event.y, touch3D=false }
else
if ( event.x == objTouched.prevTouch[“x”] and event.y == objTouched.prevTouch[“y”] and “moved” == event.phase ) then
– If a moved phase is registered on the exact same X/Y, then set the boolean 3D touch flag
objTouched.prevTouch[“touch3D”] = true
elseif ( ( event.x ~= objTouched.prevTouch[“x”] or event.y ~= objTouched.prevTouch[“y”] ) and “moved” == event.phase ) then
– If an actual move occurs, for example if the user (even following a 3D touch)
– moves the touch point, reset the boolean flag to false
objTouched.prevTouch[“touch3D”] = false
end
if ( “moved” == event.phase and objTouched.prevTouch[“touch3D”] == true ) then
print( “THERE WAS A 3D TOUCH!” )
elseif ( “moved” == event.phase and objTouched.prevTouch[“touch3D”] == false ) then
print( “NORMAL MOVED EVENT!” )
elseif ( “ended” == event.phase or “cancelled” == event.phase ) then
objTouched.prevTouch = nil
end
end
return true
end
[/lua]
Note that I just hacked this code out and haven’t tested it on a 6S. In fact, if you could test this on your end and see if it works, I’d appreciate it, and if I didn’t take into account some conditions, then provide your input and I can tune this up for others who might be facing the same issue.
Thanks,
Brent