How to pick a gui node when node is scaled down?
The below code doesn’t work properly. Works when I touch “start/frame” at centre only. No reaction when I touch at the edge of “start/frame”. Should I scale action.x and action.y?
function on_input(self, action_id, action)
if action_id == hash("touch") and action.pressed then
local play_button = gui.get_node("start/frame")
if gui.pick_node(play_button, action.x, action.y) then
gui.set_scale(play_button,vmath.vector3(1.1,1.1,1))
end
end
end
p.s.: I have big assets (2048x1536) only. In my game I scale down assets for lower (iPhone 5S) and scale up for larger (Samsung 6) resolutions.