I'm making an isometric game which requires you to click and select (by turning a flag on) specific objects and interact with them. The problem is I want to make sure you can only select one item at a time and when two items are overlapping each other and they are clicked both items are not selected.
I want to make it so when you click an object that is overlapping another object, only the object on the highest layer will be selected. Alternatively it could be the object with the highest Y value is selected (as the highest layered objects are closer to the bottom as the screen)
Can anyone think of any methods of achieving this?
There was an issue with multiple target locations being created in the path of the same lightning bolt, and what would happen is the target first overlapped by the lightning bolt would cause an explosion, even if the target further down the screen (with the greater Y coordinate) was first.
I'm fairly sure I simply used Spread Values to solve the issue. Have a look at the open source file for more info. It may solve your issue, or it may inspire you to approach your problem from a different direction.