Hello guys! This is my first post on this forum and english is my second lenguage so sorry in advance.
Ive been making a little mobile game that you can collect coins by touching them, they simply add 5 to a global variable and just destroy the instace. My problem is when multiple coins are overlapping and you touch them, they all get destroy and for some reason they only add up 5 value when should be adding 5 for each instance (I dont know why this happends...).
My question is How do I only select one instance ( maybe the closest one to the touch input or the one with more value ) on touch?