playMaker

Author Topic: ios touch input lag on UI near edge of screen  (Read 901 times)

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
ios touch input lag on UI near edge of screen
« on: June 28, 2022, 08:25:43 PM »
This one had me tearing my hair out.. I wasn't able to find many posts about this so thought I'd post here and see if anyone has any playmaker based solutions.

In the last month I started noticing that buttons in my ios game were feeling a bit sticky and taking up to 1 sec to respond to a tap. After days of going through my recent changes I finally realized that moving the buttons to the middle of the screen fixed the lag entirely. Some online hunting lead to me to posts saying that iphone has a built in delay if you tap near certain edges of the screen. This is because its waiting to see if the user is doing a gesture (such as swiping the control center down or minimizing the app). After a sec it decides they are not and it allows the tap to actually happen. Not sure when this was introduced but I only started noticing it recently.

Of course one fix is to move all my UI away from the edges (about 1/2 inch seems to do it). I've found a couple of posts with people seeming to override it, mentioning tings like this:
var preferredScreenEdgesDeferringSystemGestures: UIRectEdge[/size]
I'm not a coder so I'm not sure about that command.

Does anyone know of any playmaker action that could override this annoying quirk?

I'm kind of shocked by how few posts I can find about this!
Thanks

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
Re: ios touch input lag on UI near edge of screen
« Reply #1 on: August 14, 2022, 03:35:08 PM »
Okay I found the solution to this. It doesn't require any coding or playmaker actions. Inside the Unity 'project settings' there is a tick-box to 'defer system gestures'.

Unity

Edit>Project settings
>Player (in the left menu)
>iOS tab
>Other settings
>'Defer system gestures on edges'
Then tick on all the sides you want your game UI to take priority over.

Fixed.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: ios touch input lag on UI near edge of screen
« Reply #2 on: August 14, 2022, 11:43:23 PM »
Hi.
Thanks for Sharing your solution!