I did not work with inventory myself before but I think you destroy the actor. The actor lies in front of your character and you run over it, then the actor gets destroyed and data gets added to your inventory like ActorClass, Amount, maybe SlotID. When you want to drop it, it gets deleted from your inventory and an Actor gets spawned in front of you.
how do I remove an Actor from the Scene witout destroying the Actor-Object ?
I want to implement a Inventory-System Items shoud be removed from the Scene and stored in my Inventory. Later they coud be dropped, so they must be added to the scene.
I’ve recently did something like it. What I did is:
SetHidden(true); StaticMesh->SetCollisionResponseToChannel(ECC_GameTraceChannel2, ECR_Ignore);
Obviously, you’ll need to set collision responses of all respective components of your actor. In my case the item stays where it is, players just don’t see it and can’t interact with it in any way. When you drop the item, do the opposite and change its location.
I found this approach easier than destroying and spawning items for the replication purpose.