Delay registering touches with 3D touch enabled - video included

I’m on corona 2017.3068

This is an odd one but I noticed since I got my new phone (iPhone 7)… my game had a second long delay in registering touches on the far left side of my screen.  I thought this was a bug with my code and troubleshooted quite a bit yesterday.  Eventually I removed all my code within my touch function and just logged e.phase…

what I noticed was after pressing on the far left side of the screen my touches would not register for a full second.  I tried turning off 3d touch and then the game was perfectly responsive.  no delay anymore.

https://www.youtube.com/watch?v=ZRsgO-ViWiw

here is the code… I emptied the body of this function and still had the delay when logging to the console.

function screenTouched(e) if not inputEnabled then do return end end local left = (e.x \< display.contentWidth/2) and true or false -- GAMEPAD if control == "gamepad" then if left then gamepad.touchID = e.id if e.phase == "began" or e.phase == "moved" then gamepad:move(e) elseif e.phase == "ended" then gamepad:stop() end else if gamepad.touchID == e.id then gamepad:stop() else gamepad:jump(e) jumpTouch(e) end end -- JOYSTICK else if e.phase == "began" and left then joystick.touchID = e.id end if joystick.touchID == e.id then joystickTouch(e) else jumpTouch(e) end end end

I don’t know if this is the issue or not, but on iPhones when your finger is that close to the edge, it may be trying to detect if you’re trying to swipe up on the control panel and the OS may be stealing the touch until it decides that you’re not really going to swipe there.

The other side of the screen has the Notification center pull down.

Rob

Thanks for the reply. I suppose that’s a possibility… But I wonder why that would behave differently depending on 3d touch?

3D touch could affect the timing some how. I noticed that even after you turned it off some touches along the edges still didn’t move the character.

Rob

nah it works 100% perfect with 3d touch turned off.  i was trying to hit the absolute edge of the screen so i was missing it sometimes  :slight_smile:  it was hard to aim my finger the way i was filming.  

I don’t have a force touch iPhone, but I read that touching hard and pulling from a side of the screen, it brings up the multitask control instead of the control panel or notification center. The area is pretty big though, about 100 pixels wide. So it waits until it knows if this will be a firm or a gentle touch.

But is there any way to avoid that? I know that this can be overwritten in Unity, is there a similar function in Corona?

I still haven’t found a solution – How does everyone else solve that?

I don’t know if this is the issue or not, but on iPhones when your finger is that close to the edge, it may be trying to detect if you’re trying to swipe up on the control panel and the OS may be stealing the touch until it decides that you’re not really going to swipe there.

The other side of the screen has the Notification center pull down.

Rob

Thanks for the reply. I suppose that’s a possibility… But I wonder why that would behave differently depending on 3d touch?

3D touch could affect the timing some how. I noticed that even after you turned it off some touches along the edges still didn’t move the character.

Rob

nah it works 100% perfect with 3d touch turned off.  i was trying to hit the absolute edge of the screen so i was missing it sometimes  :slight_smile:  it was hard to aim my finger the way i was filming.  

I don’t have a force touch iPhone, but I read that touching hard and pulling from a side of the screen, it brings up the multitask control instead of the control panel or notification center. The area is pretty big though, about 100 pixels wide. So it waits until it knows if this will be a firm or a gentle touch.

But is there any way to avoid that? I know that this can be overwritten in Unity, is there a similar function in Corona?

I still haven’t found a solution – How does everyone else solve that?