Issues with collider or raycast
Hi
I create a 2D non-game touch app with UI only. And for this app i had to create some popup. You can drag, resize and rotate them. The issue i have is that when two popup are in the same position (one on top of the other), and that i drag the one i touch (aka the one on top), this is the back one that is moved...
So i put a debug.log on a raycast to check the name of the object that is moved and sometime it's the good one and sometime (depend on where i touch) this the one of the back one.
So i found a sort-of solution by changing the Z position of the one i hit to put it nearest of the camera But if i hit the one in back, this is still this one who going to move.
I tried collider and collider 2D and got the same issue with the two...
I had an idea to change the position of the popup i hit in the hierarchy so it will get in front of the other but it is weird when the two are exactly in the same position.
Anyone got the same problem ? I'm pretty new on unity so i'm probably doing something wrong but i didn't see how i can fix this