Drop item when drag & drop outside menu

Hi! I’m new to unreal engine, and I’ve been learning how to use it for a few days now. I’m currently learning how to make an inventory, based on a youtube tuto.

My inventory works well, with a slot system, and detects items, which is limited to 20 in quantity. To do this, I made a blue print structure, in which the name, quantity, mesh and thumbnail of the item are displayed.

I also added a Drag&Drop system, which lets me move items from one box to another, along with their quantity.

However, I’d like to add a drop system (remove the item from the inventory and throw it on the ground), when I drag & drop the item outside the inventory area. I’ve managed to make a Boolean variable that detects when I drag my cursor outside the inventory, but I can’t manage to remove the item I drag. It removes all the items at once as soon as I drag without dropping the items outside the inventory zone.

Do you have a solution for me, or perhaps a clue?
Thanks in advance.





I’ve solved the problem! I had to create a “Drag desactivated” variable so that it recovers when the drag is cancelled. Now it works correctly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.