This is a game I made with HaxeFlixel (latest version 4.3.0), and so uses OpenFL 3.6.1.
At first I thought this was a hardware issue, but then I noticed that only my most recent game wasn’t detecting touches near the top and bottom of the screen reliably (in landscape position). Other apps (including older games I made with HaxeFlixel) work fine. I have also tested this with a minimal project template, and the issue is still there.
I have been testing on an iPhone 5s. This problem does not occur in the simulator, nor on Android devices.
Detailed characteristics of the problem:
The beginning of a touch is not detected near the longer edges of the screen, unless I hold it for about 1 second.
The end of a touch is detected reliably.
For some reason, if I’m holding a tap anywhere on the screen, I can then tap with another finger on the edges and the start of those taps are detected reliably.
I have traced the problem to Lib.current.stage.addEventListener(TouchEvent.TOUCH_BEGIN, handleTouchBegin); This event isn’t triggered when I start a tap near the edges.
Any ideas of what could be causing this? Thanks in advance.
Yeah but in my game you can tap anywhere on the screen and there’s a local multiplayer feature where players tap on the corners of the screen. If I have to restrict taps so they can’t be made near the edges, it’s awkward to play.
And for some reason this doesn’t happen in my older games, even when played in iOS 11.
Is there a way to add this code when exporting for ios? If it were android, I would make an alternate GameActivity.java and point to it with <template …/> from project.xml, but there seems to be no such relevant file for ios in the template.