Drag and drop not working when sprite is overlapping with other objects.

Hi,
So i have a little problem with my Drag and Drop system. When my sprite with the Drag script completly overlaps with the Drop or Drag zone i just cant grab it. If its just half overlaping i can drag it perfectly on the corners wich are not overlaping. I dont no why this is not working but i think its not a big problem. One more information: The sprite is attachted to the panel wich is overlaping with the sprite.
Thank you a lot
Cryttexx

Hello there,

I’m not sure exactly how you’ve implemented your drag & drop system, but I know I had this issue when building mine with Unity’s UI system. Basically, you want to make sure that all elements that could be in front of your object have their “Raycast Target” set to false. That way, they ignore clicks and you can select the object behind it.

If you have multiple objects you need to set at the same time, you can also put them under an object with a “Canvas Group” component on it. Then, you can just set the Canvas Group to make them accept/ignore clicks as you will.


I hope that helps!

Cheers,

~LegendBacon