I've been trying to do this for the last two days, and at this point, I think I am so wrapped up in it that I must be missing a very simple and normal way to do this.
I've got a family of sprites, when overlapping one of them I need to select that instance (creating an outline when selected and deleting it when not selected/overlapping). When an instance is selected and a key is pressed I need it to change states and do something.
The issue here is when I am overlapping more than 1 instance it either changes both of their states or will keep the first one I overlapped with selected even if I move out of its collision area while still overlapping the 2nd instance.
I feel like I've tried all the obvious ways of picking the closest instance to me when 2 or more instances are selected, but obviously, I am missing something. Any suggestions would be great! This is for a game jam, so if I can't figure it out in the next couple of days I'll just have to leave it how it is...