Create Tools/Weapon
Create BP actor called BP_Item (the tools be picked up)
Add static mesh and collision box (area that player able to trigger the pickup)
Make sure collision box preset as Overlap All Dynamic
Create a BP interface, called BPI_Items
Open it, rename the function as PickUp
Back to BP_item → Class Settings,
Add the BPI Interface
R click on Pickup, Implement event in the interface column, a pickup node is created in event graph:
Create Pickup on character:
go to 3rd person BP event graph
Test in scene if the tool destroyed/disappeared upon picking up
Create pick up item BP adoptable with different meshes
To BP_item, add variable Item model to place, make it public
Go to its construction script
Now the item meshes can be changed in Details when the BP_item dragged in scene:
Equip the tools/weapon
Go to 3rd person viewport, on character mesh, add a static mesh called EquipedItem
Parent socket on R hand, fine tune its position in palm
add cast to bp item and following:
To BP Item, add the node below
Create socket on player hand (for better position of equipped tools)
Open the player mesh skeleton,
Skeleton tree → Hand_r (R click, add socket)
Name as itemSocket
R click on it ,add the sword for preview
Position it in palm
Add different socket for each tool/weapon for precise grabbing position
(rename original one as weaponSocket, added one as CylinderSocket)
Back to 3rd person BP, change the parent socket to item socket
Reset location and rotation to 0,0,0
Go back to 3rd person, in view port, duplicate EquipedItem component, name as cyldinerItem, add cylinder socket
In graph, add branch and:
(set nodes that can adopt more than 1 socket)
If having more than 2 tools, add more branch:
For 3 tools, etc:
Add anim to make tools shrink before disappeared:
to BP_item event graph:
double click timeline node, float value, name as ShrinkTimeline, length set as 0.30:
R click on the curve, add 1st keyframe, set as time, value as 0,0
add 2nd key, same time 0.30, value 1
Back to event graph, add follow nodes from Shrink timeline output just created:
(Lerp node is for run slowly of value from one to another one)
add sound during pickup