Skip to content
CISV2.0GET IT ON FAB

GUIDESPICKUP ITEM

Pickup item

This guide makes BP_MyPickup, an item the character walks up to from any side, picks up with a pick-up animation, and removes from the level. The animation matches the height of the item: a low item is picked up from the floor, a higher one from a table. You do it in six steps, with one short graph and no other code.

  • You have followed Quick start, so you know how a side and its actions are set up.
  • Any Static Mesh for the item, for example the engine’s basic cube; a mesh of your own works too, if its pivot is at its bottom.
  • The demo character BP_CISCharacter and the demo classes BP_MoveToDistanceMoveHandler and BP_InteractionObjectActionPickUp, which ship with the plugin. The demo move handler moves only BP_CISCharacter: with your own character the action still runs, but without the walk to the item.

Then follow these steps in order.

  1. In the Content Browser, choose Add › Blueprint Class, pick Actor as the parent class and name the Blueprint BP_MyPickup. Open it and add these components:

    • A Static Mesh named ItemMesh, with your item’s mesh. Set its Scale to 0.3 and its Location Z to 15, so the mesh sits on the origin of the actor: the origin is the bottom of the item. Keep its default collision: the character finds the item only while its trigger overlaps one of the item’s components, and a static mesh with default collision generates the overlap events that make this happen.
    • The interaction object component. Click Add, search for CISInteraction Object and add it. Its class is UCISInteractionObjectComponent, and its component name is CISInteractionObject.

    Open Class Defaults and, under Replication, turn on Replicates, so that the item’s removal reaches every player in a multiplayer game.

  2. Make it usable from every side. Select CISInteractionObject. Under Interaction Settings, set Interaction Distance to 300, and set Object Priority to 1. Object Priority adds to the score the character gives each object in reach; the demo character also scores distance and view, and the object with the highest total is used. Turn on Override Character Interaction Angle and set it to 180. The character’s view then accepts the item anywhere in front of it, up to 90 degrees to each side of where the character looks, so the character must still face roughly towards the item.

    Under Interaction Sides, click + to add one side. Set Interaction Angle Min to 0 and Interaction Angle Max to 0, and turn on Angle Side. With both angles at 0 and Angle Side on, the side is the whole circle around the item, so the item can be used from every side.

  3. Walk up to it. On the side, set Interaction Object Side Move Handler to BP_MoveToDistanceMoveHandler, set Move To This Component to DefaultSceneRoot, the root of the Blueprint, set Looking Point to ItemMesh, so the camera turns to the item, and set Move Distance to 60, the value the demo item uses. The character stops 60 cm from the item’s origin, on the side it comes from, and then the action starts.

  4. Pick it up. Under Interaction Object Side Actions, click + and fill the entry: Interaction Object Action BP_InteractionObjectActionPickUp, and New State After Finish Action CIS.PickObject.Picked. Leave Required State Tag empty, and leave Initial Object State of CISInteractionObject empty too: the item has no state before it is picked up.

    The action plays one pick-up montage, chosen by the height of the item. Its Pick Up Montages map gives Man_PickUp_Floor_Montage for height 0, Man_PickUp_Table_Montage for 80 and Man_PickUp_Top_Montage for 170, in centimetres above the character’s feet. The action measures the height of the item’s origin above the feet and plays the montage whose height is nearest. A buyer with their own mesh should check that its pivot is at the bottom: a pivot at the centre counts as half the item’s height above the floor. When the montage ends, the action sets the item’s state to CIS.PickObject.Picked.

    Settings
    Interaction Settings
    Interaction Sides1 Array element
    Index [ 0 ]
    Interaction Angle Min0.0
    Interaction Angle Max0.0
    Angle Side
    Interaction Object Side Move HandlerBP_MoveToDistanceMoveHandler
    Move To This ComponentDefaultSceneRoot
    Looking PointItemMesh
    Move Distance60
    Continue Tick After Finish Movement
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Interaction Object Side Actions1 Array element
    Index [ 0 ]
    Required State Tag
    Interaction Object ActionBP_InteractionObjectActionPickUp
    New State After Finish ActionCIS.PickObject.Picked
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Action Execution TypeStart After Finish Move Handler
    Debug Data
    Interaction Distance300.0
    Angle Detection Component
    Override Character Interaction Angle
    Override Character Interaction Angle180.0
    Object Interruption TypeNone
    Override Object Use Time
    Override Object Use Time0.0
    Visible Conditions0 Array element
    Usable Conditions0 Array element
    Override Data Object Class
    Data Object ClassNone
    Object Priority1
    Transfer Ownership During Use
    Manage Owner Dormancy
    Max Use Duration0.0
    The interaction settings of BP_MyPickup after step 4. One side, used from every direction, with the pick-up action and its new state.
  5. Remove it after the pickup. Select CISInteractionObject, and in the Event Graph add its On Object State Changed Delegate event; the node is titled On Object State Changed Delegate (CISInteractionObject). Its New State pin gives the state the item has now.

    • Add an Equal (GameplayTag) node (search for ==), set its second pin to CIS.PickObject.Picked and wire New State to its first pin. Add a Branch, wire the event’s execution pin to its Execute pin, and wire the equal node to its Condition.
    • From the True pin of the branch, add Destroy Actor, and wire the True pin to its Execute pin.

    The event also runs on clients when the replicated state reaches them. The server’s call removes the item, and the removal reaches every player because the item replicates. The same call on a client has no effect.

    The Event Graph of BP_MyPickup. When the item's state becomes picked up, the item is destroyed.
  6. Place it and play. Open /CharacterInteractionSystem/Demo/Levels/CISExampleMap, drag BP_MyPickup into the map near the demo character’s start, click Play, walk up to the item and press E.

SettingWhat it does
Object PriorityAdds to the score the character gives each object in reach, and the object with the highest total is used. The item uses 1; the range is 0 to 10.
Angle SideUses the part of the circle outside the range between the two angles. With both angles at 0 and Angle Side on, the item can be used from every side.
Override Character Interaction AngleReplaces the character’s own view angle for this item. 180 accepts the item anywhere in front of the character, up to 90 degrees to each side; the character must still face roughly towards it.
Move To This Component, Looking Point and Move DistanceThe move handler’s Move To This Component is the reference point (DefaultSceneRoot, the item’s origin), Looking Point is what the camera turns to (ItemMesh), and Move Distance is how far from the reference point the character stops, 60 cm here. The demo item uses 60.
New State After Finish ActionThe state the item gets when the pick-up montage ends. The graph in step 5 waits for CIS.PickObject.Picked.
  • Walk up to the item from any side, face it and press E: the character walks to the item, plays the pick-up montage, and the item disappears.
  • Place two items at about the same distance in front of the character, one with Object Priority 1 and one with 5: the character picks up the one with 5 first.
A small grey cube on a pale corridor floor between dark blue tiled walls, seen from a few metres away, with an orange E | INTERACT prompt drawn above the corridor.
The prompt shows the item can be used: the character is in reach and facing it.
  • The item does not disappear: the state the graph waits for is not the one the action sets. Check New State After Finish Action of the pick-up action, and that the Equal (GameplayTag) node in step 5 has CIS.PickObject.Picked.
  • The item disappears for the server or the listen host but stays on clients: Replicates is off in Class Defaults. Turn it on under Replication, so the removal reaches every machine.
  • The character does not walk up to the item: check that Move To This Component of the move handler names DefaultSceneRoot, the root of the Blueprint.
  • Nothing happens when you press E near the item: check that its Static Mesh keeps default collision, that the character stands within 300 cm and faces the item.
  • The item moves when the character walks into it: keep the item out of the path the character walks.