Skip to content
CISV2.0GET IT ON FAB

GUIDESTWO-SIDED DOOR

Two-sided door

This guide makes BP_MyDoor, a door the character can open and close from either side. Each side has its own approach point and two montages: one that opens the door and one that closes it. The character walks to the point of the side it stands on and plays a montage, and the door plays its own montage. 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.
  • The demo door mesh /CharacterInteractionSystem/Demo/Meshes/Door/Door_Rig. Its montages, which ship with the plugin, are named in steps 3 and 4.
  • The demo classes BP_InteractionObjectActionPlayMontage and BP_MoveToComponentMoveHandler, 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 point.

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_MyDoor. Open it and add these components:

    • A Skeletal Mesh named DoorMesh at location Y 45. Set its Skeletal Mesh to /CharacterInteractionSystem/Demo/Meshes/Door/Door_Rig, its Animation Mode to Use Animation Blueprint and its Anim Class to ABP_Door_Rig_Skeleton. Without the Anim Class the door’s montage cannot play, and the door stays still while the character moves.
    • Two Arrow components attached to the root. ForwardPosition is at location X 75 with rotation yaw 180, so it faces the door. BackwardPosition is at location X -75 with yaw 0. Each marks the spot where the character stands on its side.
    • Two Scene components attached to DoorMesh, with no rotation. ForwardPoint is at location X 7.8, Y -82.5, Z 89.5, and BackwardPoint at X -6.0, Y -82.6, Z 89.5. Each is the point the character looks at on its side.
    • A Box Collision named OverlapBox with Box Extent X 100, Y 100, Z 110 (half sizes, so the box covers the door’s opening) and Generate Overlap Events on. The character finds the door only while its trigger overlaps one of the door’s components, and a skeletal mesh added in the editor has no overlap events by default, so the box gives it one.
    • The interaction object component. Click Add, search for CISInteraction Object and add it. Its class is UCISInteractionObjectComponent, and its component name is CISInteractionObject.
  2. Select CISInteractionObject. Under Settings, set Initial Object State to CIS.Object.Door.Closed. Under Interaction Settings, set Interaction Distance to 120. The demo door uses 120, closer than the default of 300.

  3. Set up the front side. Under Interaction Settings › Interaction Sides, click + to add a side. Set Interaction Angle Min to −80 and Interaction Angle Max to 80, which is the front half of the door. Set Interaction Object Side Move Handler to BP_MoveToComponentMoveHandler, Move To This Component to ForwardPosition and Looking Point to ForwardPoint.

    Under Interaction Object Side Actions, click + twice and fill the two entries:

    • Entry 0, the door closed and then opened, pulled towards the character: Required State Tag CIS.Object.Door.Closed; Interaction Object Action BP_InteractionObjectActionPlayMontage; Montage On Character AnimSequence_CharacterOpenDoorPull_Montage; Montage On Object AnimInstance_DoorOpenPull_Montage; Mesh Component On Object DoorMesh; New State After Finish Action CIS.Object.Door.Opened.
    • Entry 1, the door opened and then closed, pushed away from the character: Required State Tag CIS.Object.Door.Opened; Interaction Object Action BP_InteractionObjectActionPlayMontage; Montage On Character AnimSequence_CharacterCloseDoorPush_Montage; Montage On Object AnimInstance_DoorClosePush_Montage; Mesh Component On Object DoorMesh; New State After Finish Action CIS.Object.Door.Closed.
  4. Set up the back side. Right-click side 0 and choose Duplicate Item, so that side 1 starts with the same move handler and actions. Set its Interaction Angle Min to 95 and Interaction Angle Max to −95. Leave Angle Side off: the side is then the smaller arc through 180°, which is the back of the door. Set Move To This Component to BackwardPosition and Looking Point to BackwardPoint.

    Then change the two entries of its actions:

    • Entry 0, the door closed and then opened, pushed away from the character: Required State Tag CIS.Object.Door.Closed; Montage On Character AnimSequence_CharacterOpenDoorPush_Montage; Montage On Object AnimInstance_DoorOpenPush_Montage; Mesh Component On Object DoorMesh; New State After Finish Action CIS.Object.Door.Opened.
    • Entry 1, the door opened and then closed, pulled towards the character: Required State Tag CIS.Object.Door.Opened; Montage On Character AnimSequence_CharacterCloseDoorPull_Montage; Montage On Object AnimInstance_DoorClosePull_Montage; Mesh Component On Object DoorMesh; New State After Finish Action CIS.Object.Door.Closed.
    Settings
    Interaction Settings
    Interaction Sides2 Array elements
    Index [ 0 ]
    Interaction Angle Min-80.0
    Interaction Angle Max80.0
    Angle Side
    Interaction Object Side Move HandlerBP_MoveToComponentMoveHandler
    Move To This ComponentForwardPosition
    Looking PointForwardPoint
    Continue Tick After Finish Movement
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Interaction Object Side Actions2 Array elements
    Index [ 0 ]CIS.Object.Door.Closed
    Required State TagCIS.Object.Door.Closed
    Interaction Object ActionBP_InteractionObjectActionPlayMontage
    Montage On CharacterAnimSequence_CharacterOpenDoorPull_Montage
    Montage On ObjectAnimInstance_DoorOpenPull_Montage
    Mesh Component On ObjectDoorMesh
    New State After Finish ActionCIS.Object.Door.Opened
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Index [ 1 ]CIS.Object.Door.Opened
    Required State TagCIS.Object.Door.Opened
    Interaction Object ActionBP_InteractionObjectActionPlayMontage
    Montage On CharacterAnimSequence_CharacterCloseDoorPush_Montage
    Montage On ObjectAnimInstance_DoorClosePush_Montage
    Mesh Component On ObjectDoorMesh
    New State After Finish ActionCIS.Object.Door.Closed
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Action Execution TypeStart After Finish Move Handler
    Debug Data
    Index [ 1 ]
    Interaction Angle Min95.0
    Interaction Angle Max-95.0
    Angle Side
    Interaction Object Side Move HandlerBP_MoveToComponentMoveHandler
    Interaction Object Side Actions2 Array elements
    Index [ 0 ]CIS.Object.Door.Closed
    Index [ 1 ]CIS.Object.Door.Opened
    Action Execution TypeStart After Finish Move Handler
    Debug Data
    Interaction Distance120.0
    Angle Detection Component
    Override Character Interaction Angle
    Override Character Interaction Angle0.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 Priority0
    Transfer Ownership During Use
    Manage Owner Dormancy
    Max Use Duration0.0
    Initial Object StateCIS.Object.Door.Closed
    The interaction sides of BP_MyDoor after step 4. Side 0 is open; side 1 shows its two action entries, closed.
  5. Keep the door open or closed after its animation. Select CISInteractionObject in BP_MyDoor, and in the Event Graph add its On Object State Changed Delegate event. Drag DoorMesh into the graph and call Get Anim Instance on it. From its return value, call On State Changed, the message of BPI_InteractionObject. Wire the event’s execution pin to the message’s execution pin, and wire the event’s New State to the message’s New State. The door’s Animation Blueprint ABP_Door_Rig_Skeleton keeps the closed or the open pose from the state it receives through BPI_InteractionObject, so without this graph the leaf swings back to closed as soon as the montage ends.

    The Event Graph of BP_MyDoor after step 5. The state-changed event passes the new state to the door's Animation Blueprint.
  6. Place it and play. Open /CharacterInteractionSystem/Demo/Levels/CISExampleMap, drag BP_MyDoor into the map near the demo character’s start, click Play, walk to the front of the door and press E. Then walk round to its back and press E again.

SettingWhat it does
Interaction Angle Min and Interaction Angle MaxThe range of directions around the door, measured from its forward direction, that the side can be used from. The front side is −80 to 80, the back side 95 to −95.
Angle SideUses the part of the circle outside the range between the two angles. It is off on both sides here.
Interaction Object Side Move HandlerThe move handler that walks the character to the side’s point. The demo handler is BP_MoveToComponentMoveHandler.
Action Execution TypeWhen the action starts. The default, StartAfterFinishMoveHandler, starts it after the character reaches the point.
Interaction DistanceHow close the character must stand to the door, measured flat from the door to its feet. The demo door uses 120.

Move To This Component, Looking Point and Mesh Component On Object are component references: each one picks a component of the door. See Component references.

  • From the front, press E: the character walks to the front position and the door opens towards the character. Press E again to close it.
  • From the back, press E: the door opens away from the character. Press E again to close it.
  • After the character opens the door, wait until the animation ends: the door stays open. After it closes the door, the door stays closed.
  • Select the door in the level. With Debug in Editor is on by default under Settings › Debug, so the sides the door can be used from are drawn in the viewport.
The door closed, handle on the right, seen from a three-quarter view.
The door closed, seen from the same three-quarter view as the door opened from the front.
The door after it is opened, seen from a three-quarter view. The leaf has turned away from the wall line, with its handle on the left and the wall visible through the glass.
The door after the character opens it from the front, seen from a three-quarter view.
The open door seen from a three-quarter view. The leaf has turned away from the wall line, with its handle on the near edge and the wall visible through the glass.
The door opened from the back side, seen from a three-quarter view.
  • The character does not walk to a side, or stops short of it: Move To This Component or Looking Point points at a component the door does not have. The Output Log then shows Component '<name>' (<class>) not found on <actor> (class <class>). Select the component again in the settings. An empty reference names no component and writes no warning, so check that both fields are set.
  • Nothing happens from either side: the character finds the door only while its trigger overlaps one of the door’s components. Check that OverlapBox has Generate Overlap Events on and covers the door’s opening.
  • The character uses the other side, or no side: check Interaction Angle Min and Interaction Angle Max on both sides. The angles are measured from the door’s forward direction, positive towards its right.
  • The door opens and swings back closed at once: the step 5 graph is missing or not wired. Check that the return value of Get Anim Instance is wired to the Target pin of On State Changed, and that its New State pin is connected.
  • The character plays its montage but the door does not: check that Mesh Component On Object of the action is DoorMesh, and that DoorMesh has the Anim Class ABP_Door_Rig_Skeleton.
  • Nothing happens and no prompt shows: the character does not face the door. Turn towards the door until the prompt appears. The angle is measured to the door’s root unless an angle detection component is set.
  • Nothing happens although you are close and facing the door: the current state has no action. Check Initial Object State and the Required State Tag of each entry. To see why a use is refused, type log CISLog Log in the console, play again and look for CISLog lines in the Output Log.