Fix for picking up items affecting Terrain/Landscapes and regular static meshes:
The easiest way I sought to do this was adding a variable in BaseItemPlaceholder (IsPickable - Bool) As default set this to true (Else you will have to set it to true on every item you make based off the BaseItemPlaceholder)
After this Boolean has been created, open up MyCharacter blueprint and open the “Server Attempt Hit Trace” function. In we need to check the Boolean to decide whether to proceed with the Destroy Actor functions and so on.
I added this between :
[Switch Has Authority>CheckActorHitbyTrace] and the [branch that checks the “Trace hit” condition]
After Check Actor Hit By Trace, Execute a “Cast To BaseItemPlaceHolder” " - As Base Item Placeholder call the IsPickable Boolean , connect to the existing branch that checks TraceHit condition.
Break the link between this branch and the TraceHit Boolean, and create an AND Boolean off the branch.
Plug in both the IsPickable, and the TraceHit.
Also make sure to connect the ObjectHitActor from Check Actor Hit By Trace, into the object input in the Cast To BaseItemPlaceholder.
Compile and save; Now your regular static meshes and/or terrain landscapes should be safe, and you will only be able to pick up any item created based on the BaseItemBlueprint (as long as IsPickable is true in any instance of this class)
[hr]
*
Does anybody know a less clunky way to drop items back into the world? I imagine Addude14’s solution being tedious and inefficient when it comes to hundreds of pickable items…
Thanks in advance, I’ll mull it over too but I’m new to UE4 so no promises… *