Download

Inventory UI with UMG

Hi,
I’ve run into a problem after following the “Inventory UI with UMG” videos from the Gameplay Concept Examples from the engine launcher.
It works perfectly as far as the tutorial is concerned but I would like the items to be added by looking at them and clicking the LMB, this I have achieved.

The problem occurs when I have added an item and want to return to the game from the inventory UI, If I drop the item and don’t move (the “in range” boolean is true) then press to get into the game again, the engine thinks I’m picking up the item again (line trace fires even if I’m not looking at the item). The next time I want to pick up another instance of the item the line trace doesn’t care if it hits the item, only that I’m in range and collision of the object is on.

Any help in making me fix this would be greatly appreciated.

Kind Regards,
Bonny

Edit: So I might have found a solution (indirectly the problem) instead of passing the “has tag” directly from the a (line trace -> break hit result -> actor has tag) to a branch, I set it in a variable and then clear that variable after having added the item, this seems to work for now.