Getting actor when clicking on the mesh

Hi,

for my item/inventory system I need to handle clicking on the item in the world, so it adds the clicked item to the inventory.

How do I handle clicking on an item actor so it returns the clicked item actor to store in a variable? I need the Item in a variable so I can add it to the inventory array.

I found something about Onclicked.AddDynamic and then enable mouse events in the player controller but I don’t know how to do this. How do I enable mouse events in the controller and where do I put the OnClicked.AddDynamic? in the player controller or in the Item class?

Any help would be greatly appreciated!