Home › Workflows › Make an object grabbable

Make an object grabbable

By the end of this you will have an object a player can pick up with either hand, in VR, and drag on desktop.

Steps

  1. Open the actor Blueprint you want to make grabbable. It needs at least one collidable mesh component.
  2. Add a BPC_Interaction_Grip_Pickup component.
  3. Set Highlight Class to BPC_Highlight_Material and choose a Highlight Color so the player gets hover feedback.
  4. Add one or more BPC_Socket_Grip components and position them where a hand should attach. Keep the Grip_ name prefix.
  5. Add a BPC_PickupCoordinator component if the object should support being held by two hands at once.
  6. For multiplayer, add a BPC_Replication_Actor component.
Adding the grip interaction component
howto_grabbable_01.pngAdding the grip interaction component
Adding the grip interaction component
Placing grip sockets on the mesh
howto_grabbable_02.pngPlacing grip sockets on the mesh
Placing grip sockets on the mesh
The finished result — the object held in the hand
AFS_UX_Grip_pickup.pngThe finished result — the object held in the hand
The finished result — the object held in the hand

Notes

The closest valid socket wins when several are in range, scored by distance within Max Attach Distance. Set Required Prefix on the interaction if the object should only accept particular sockets.

Bind to On Gripped Start and On Gripped Release on the interaction component to react.

Implement Interface_Grip on the actor and return false from CanBeGripped to veto grabbing under your own conditions.

Multiplayer

Without BPC_Replication_Actor, other players will not see the object move. The replication component handles interpolation and authority hand-off automatically when a player picks it up.