Hello! I want to create draggable items for inventories, so that you can for example drag and drop an item onto your hotbar or into another inventory, but how do I check onto which widget component the Item gets dropped onto? I thought about using the geometry but I didnt found any isOverlapping function for it.
Hey there! The drop destination is usually handled by the widget you are dropping on.
So for example you have an Item, inventory Slot in your pocket and some garbage Can you can dispose items with.
Inventory Slot and garbage Can widgets would have to have their own overrides ofOnDrop function. In that case you pull you Item over them and after releasing mouse button they catch up that action. In OnDrop you can specify what you would want to do with the dropped item, either put it in slot, or dispose of it in each widget separately.
Hope this helps!
Yeah that worked! I overwrote the OnDrop function for the inventory buttons and added a boolean to see if it can be changed by a drop and then just change the button accordingly. Thank you for your help