I am still quite new to Defold so apologies in advance for the potentially obvious answer but I couldn’t figure out if there was a way to detect a click on different game objects. I understand that if I want to select a particular game object I can do:
function on_input(self, action_id, action)
if action == go.get_position("nameOfGameObject") then
print("Object selected")
end
end
But this only detects if the user clicks on a particular game object. Is there a way to detect if the user is clicking on a game object and if the user is then return the value/name of the game object?