Touches get “stuck” when swiping up on an iPhone X in my game. I’m trying to catch it (unsuccesfully) with this code:
local function window_callback(self, event, data)
if event == window.WINDOW_EVENT_FOCUS_LOST then
is_touching_screen = false -- Not triggered on iPhone X swipe up
end
end
window.set_listener( window_callback )
I also use this code:
function on_input(self, action_id, action)
if action.pressed then
is_touching_screen = true
elseif action.released then
is_touching_screen = false -- Not triggered on iPhone X swipe up
end
end
Neither seem to fix the problem. Any other options available, or should I wave the unfixable red flag?
Hmm, we need to investigate this. @AGulev, maybe we can take a look at this today? This might have to do with touch detection outside of the safe areas of the phone. @sven?
Thanks, that’s a great link. Is there a way to get the safe areas in Defold? In my game I prevent taps at the bottom, using a value guesstimated by me.