Bug on Reload Pickups

Hi, I have a bug when a reload a scene when my character is over a picked pickup. The item its again added to inventory, like have a space between your instantiation for the pickup spawner and the destroy by the restore state. How can I fix this? My pickup system its the ontrigger enter type.

We actually do cover this in the Integration section in the lecture Random Enemy Drops. Essentially, you’ll be adding a “scatter distance” and calculating a new position for the dropped object that is hopefully far enough away from the Player to avoid picking it right back up.

Thanks, but a I found a solution puting a property “public bool IsCollected { get; private set; }” setting this in the restore state and checking in the on trigger enter on the clickable pickup if its is false, and works fine until now.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms