iOS touch input issue

I noticed on iOS touches are being passed on to other collections. I have a menu collection with a gui and the following code which just loads the game collection through a controller proxy. However when the game script is run a touch will be made and the player will die.

It only does this on iOS. On Android and on the Mac it is fine. I am releasing the input on menu collection as well.

	local play_button = gui.get_node("playbutton")
	if gui.is_enabled(play_button) then
		if gui.pick_node(play_button, action.x, action.y) then
			if self.music_on == 1 then
				msg.post("/sound#menubeep", "play_sound", {gain = 0.6})
			end
			msg.post("controller:/controller#controller", "load_game")
		end
	end

Ok sorry this doesn’t look like a bug.

if I just use the left mouse button trigger it will act as a single touch on iOS. So the following code works. Not sure why touches follow over through collections though does the engine not clear them? Or is this a hardware thing.

if action_id == hash(“left_button”) and action.pressed then

You can read more about the input here.

1 Like