This page is about spawning Item Actors into the world for the players to pick up. If you want to add items directly to the player's inventory or another storage component, see the Add Items page instead.
The Item Pickup Blueprint
When you hand place, spawn at runtime, or drop an item as a player into your world by default it will be spawned using the BP_Interactable_ItemPickup blueprint found in the Blueprints/Interactables/ folder. This is the same blueprint that is used for all of the different item pickups in the demo world. It is also the blueprint that is spawned when our player drops an item.
We will go over the different ways to use it in a moment, but first here is a breakdown of the configuration variables available to us on this blueprint. We will need to set some of these variables for each of our spawned items.
BP_Interactable_ItemPickup Variables
ItemRowName Required The Row Name for the item you wish to spawn, as defined when you
created the item.
ItemQuantity Required The quantity of the ItemRowName the player will get when they pick up the spawn.
OverrideDefaultData Override or append the default
dynamic data.
DespawnSeconds The number of seconds before the item is despawned. Countdown starts on spawn. Set to 0 (default) to keep it from despawning until the game (or server) restarts.
UsePhysics? If true (default) the item will use physics on spawning and while moving, up until MaxPhysicsTime. If the item stops moving or this time is reached physics will be disabled.
MaxPhysicsTime If UsePhysics? is enabled, this is the maximum number of seconds physics is enabled, after which it is then automatically disabled. If the object stops moving physics is disabled, which on most cases will be less then this value.
There are additional variables exposed in this blueprint related to interaction. These are inherited from the parent
BP_Interactable which is the base abstract class for all interactables in this asset. You can learn more about this blueprint, and the other included interactables in the
Interaction System chapter.
Hand Place Items in your Level
If you would like to hand place items in your level while in editor mode you can start by navigating to the Blueprints/Interactables/ folder and selecting BP_Interactable_ItemPickup. Drag and drop this blueprint into the level where you want the item to spawn. When you first drop this blueprint in the level it will be a grey box, after you enter the ItemRowName it will load your mesh. Make sure you also set your ItemQuantity. That is it! The player will now be able to pickup your item. If you run into any issues see the Most common problems section at the bottom of this page.
Hand Place Faster with Reusability
You can also inherit from this blueprint if you would like to prefill the item data for quicker reusability and data consistency. To inherit from this blueprint right click on the BP_Interactable_ItemPickup in your content browser and select Create Child Blueprint Class. Give a name to your new item pickup. Then open the blueprint and prefill your item information in the Details section. Now when you want to spawn this particular item you can just drop this new blueprint in and you won’t have to re-enter the info every time.
Spawn an Item into the world at Runtime
To spawn an item at runtime you would make a call to Spawn Actor From Class. This is a native Unreal Engine function. From the node set the class to BP_Interactable_ItemPickup. Fill out the remaining variables on the node to spawn your item. Provide the location of the spawn using the Transform input pin. In multiplayer games make sure you only call Spawn Actor From Class from the server.
Create a custom Item Pickup Blueprint
Under the surface an item pickup is just adding an item to an item storage component owned by the player, followed by being destroyed. If you would like to make your own, perhaps a more complex display, you can follow this same principle. If you want to make it work with the interactable system view the Interaction chapter for help integrating it into your own custom interactable.
Also, by default when you drop an item it uses the BP_Interactable_ItemPickup to spawn the item. You can override this to your own custom blueprint through the data table. You do however have to make sure you implement the proper BPI and handle receiving the data. I go over it in full details on the drop item subchapter.
Most Common Spawn & Pickup Related Questions
How do I make the picked up items go in the hotbar first, then the inventory?
Navigate to your player controller and select the AC_InventorySystem component you added. On the details panel scroll to and expand the Interaction configuration section of variables and you should see the ItemPickupAddToOrder array.
By default it is setup to fill into the Inventory first, then the Hotbar. The order within the array is the priority, so if you want the pickups to fill to the Hotbar first, move Hotbar above Inventory in the array list using the little handles (grid of dots) that appear on the left when you hover over an array item.
How do I auto equip equipment that I pickup?
Navigate to your player controller and select the AC_InventorySystem component you added. On the details panel scroll to and expand the Interaction configuration section of variables and you should see the ItemPickupAddToOrder array.
To auto equip any equipment related item pickups if there is not already something in the equipment slot, Add and then move Equipment to the very top of the array using the handles (grid of dots) that appear on the left when you hover over the array item.
This array controls the roll down order for items the player picks up. With Equipment at the top, and if something is already in the equipment slot, it will try to roll down to whatever is next in the list, and so on until it finds a spot or reports back that it has no room.
I don't see the mesh after entering the ItemRowName, where is it?
You may need to fix up redirectors and/or restart the Unreal Engine editor if you moved files around or made changes to any of the structures.
If that wasn't it double check the data table for your item. Make sure you have the right row name, and also make sure you didn't accidentally set your static mesh to the StaticMeshMultiple while leaving the StaticMesh blank. If you did, swap them. I did this a few times during development so I know it is bound to happen for someone else.
After pressing play my item is gone, where did it go?
It may have fallen through the floor. This happens if you don't set a simple collision to your mesh. To confirm navigate to and open your mesh with the content browser. Click the Show button at the top left of the viewport. Enable Simple Collision. If you do not see a green box around your mesh in the viewport you do not have a simple collision set for your mesh. If you need to you can add a simple collision right from this mesh window, use the Collision drop down on the toolbar to add one. Select the option that works best with the least amount of faces for your item shape. If you need to you can add multiple simple collisions to your mesh. Next make sure your Collision Complexity setting on the mesh details panel is set to use the Project Default.
If you still have trouble try with one of the included demo items, if it falls through the floor then it has to do with the collision settings on your floor not blocking the object type for the item pickup's mesh component, which by default is set as a World Dynamic.
If it was an item you dropped at runtime, those only last until the game restarts. There is no world persistance or respawning system for actors in this version of the asset.
I can't pickup any items at runtime.
The most likely cause is your collision configuration of your pawn is not detecting the pickup's mesh.
By default we overlap the Pawn and we can override this response from the data table for our item so first make sure you didn't set it to ignore in the data table.
If you have a custom channel for your pawn make sure the response is set properly on the mesh component inside the item pickup blueprint, it should overlap. You will also want to review the buildItem function to adjust the collision override from the data table, as by default it is also set to use the Pawn channel.
If you are using a custom channel for your item pickup and you changed the default from World Dynamic you will need to add your new channel to the configuration array for the interaction system. See the InteractionObjectTypes array in the Interact section of the configuration on the AC_InventorySystem component you added to the player controller. This array is the list of channels it will use when scanning for items.
My item spawned but it is floating in the air instead of falling to the ground ...
First make sure you have UsePhysics? enabled on the Item Pickup. If you hand placed the item this variable will be in the details panel when you select the item in the viewport. If you spawned it from blueprint the variable will be on the Spawn Actor From Class node.
If it is still a problem then it is most likely an issue related to your mesh's collision complexity setting. You can confirm this if the output log gave you a bunch of warnings after you stopped playing with messages like "Trying to simulate physics on".
To fix, navigate to and open your mesh. Review your Collision Complexity setting in the details for this mesh. For physics we need to use Simple and Complex.
I'm still having trouble spawning my mesh ...
Verified owners of this asset can email me your mesh obj/fbx. Include a screenshot of your item pickup configuration (specifically the item row name) as well as a screenshot of the data saved in the data table for the item (make sure row name, mesh and collision settings are visible in the screenshot). Feel free to include any additional information you think I'll need to reproduce the issue at my end. I'll take a look and report back my findings.