Player script not receiving input [SOLVED]

I have a player.go with a player.script attached, as well as gesture.script from the defold-input library. It belongs in a collection that was loaded by a collection proxy, if that matters.

I’ve also made sure that there is an entry for “touch” in game.input_binding for the left mouse button, and that “Acquire Input Focus” is enabled on gesture.script.

The code I have in player.script looks like this:

function on_message(self, message_id, message, sender)
	if message_id == hash("on_gesture") then
		pprint(message)
	end
end

But nothing gets printed at all. Is there anything that I’m missing here?

Did you attach input focus to the loaded collection proxy as well?

2 Likes

I knew I was forgetting something! Thanks for the quick reply. It’s working now.

1 Like