Cannot pickup dropped item

MagicTimm

Member
Hi, the player can pickup items which are from start in the scene. But if i drop an item from the inventory the player cannot pickup this item.
If I put some pickups in the scene and start the scene the Player can pick up the pickups. But if I click an an item in the inventory and click on drop the Player cannot pick up this dropped items.
This happen with all items (head wear, material). I checked the scene and compare the pickups. They have the same scripts and everthing is the same. Because they are the same prefab. I don't think that the pick ups object are the problem.
Then I compare the Demo Scene with my game. The entries in the Inventory Grid are nearly the same.
If the scene is running and the player pick up an item in the Player inventory script item is shown. If I drop an item it is deleted. BUt i cannot pick it up again.
I don't use the save system.

Hope you can help or assume where the bug could be.
 
Last edited:
When you say that you cannot pickup the item, it means that you cannot interact with the pickup, or does it mean you can interact with it but no items are being added to the inventory? There are no errors/warnings right?

Is your Item Pickup set to pickup on trigger enter or using an input?
Are you sure you are using the same prefab for the pickup in the scene and in the drop item action?

What type of pickup are you using, an item Pickup or an Inventory Pickup?

Send me a screenshot of the inspector of your item pickup that was set in the scene and one that was dropped, both at runtime. That might help me see what's wrong.
 
Here are the screenshots of the pick up I put in the scene before I start the game.
1620141138366.png1620141167967.png
1620141240297.png

And this it the pick up i dropped from the inventory in game
 
From those screenshots, it seems quite clear to me that you are not using the same prefab.

You can see that the Interactor Layer Mask is does not have the same value. The the prefab spawned has an Item Object Visualizer.
Double check the prefab you selected in your Item Action.

My guess is that you are unable to pickup the item because of the Interactor Layer Mask which does not contain your character layer
 
When you say that you cannot pickup the item, it means that you cannot interact with the pickup, or does it mean you can interact with it but no items are being added to the inventory? -- Yes, i press the key for pick up if the play is near the pick up and nothing happens. If the player is on the other item (which is from start in the scene) i press the key and it works all correct (item is in the inventory of the player)

There are no errors/warnings right? -- No

Is your Item Pickup set to pickup on trigger enter or using an input? -- Using Input. It works with other pick up. Only if i drop it from the inventory

Are you sure you are using the same prefab for the pickup in the scene and in the drop item action? -- yes

What type of pickup are you using, an item Pickup or an Inventory Pickup? -- ItemPickup

Send me a screenshot of the inspector of your item pickup that was set in the scene and one that was dropped, both at runtime. That might help me see what's wrong.

1620141882273.png
 
Top