Skip to content
CISV2.0GET IT ON FAB

GET STARTEDQUICK START

Quick start

This guide makes BP_MySwitch, a switch the demo character can use from any side. Each press of E clicks the switch and moves it to its other state. You do it in six steps, with no code.

  • Character Interaction System enabled in your project, as in Installation.
  • The plugin content visible in the Content Browser: open Settings and turn on Show Plugin Content.
  • The demo map /CharacterInteractionSystem/Demo/Levels/CISExampleMap, which has the demo character.

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_MySwitch. Open it and add a Static Mesh component. Set its Static Mesh to the engine’s /Engine/BasicShapes/Cube; if Cube is not in the mesh picker, turn on Show Engine Content in the picker’s settings. Set the component’s Location Z to 100 and its Scale to 0.2, so the switch sits at hand height.

  2. Add the interaction object component. In the Components panel, click Add, search for CISInteraction Object and add it. Its class is UCISInteractionObjectComponent, and its component name is CISInteractionObject.

  3. Select CISInteractionObject. Under Settings, set Initial Object State to CIS.Button.SwitchOff. The demo tags ship with the plugin, so they are available in every project that has it; to use your own tags, add them in Project Settings › GameplayTags.

  4. Under Interaction Settings › Interaction Sides, click + to add a side. Set Interaction Angle Min and Interaction Angle Max to 0 and turn on Angle Side. With both angles at 0 and Angle Side on, the switch can be used from every direction. Leave Interaction Distance at its default, 300.

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

    • Entry 0: Required State Tag CIS.Button.SwitchOff; Interaction Object Action BP_PlaySoundAction; Sound S_Switcher_Cue; New State After Finish Action CIS.Button.SwitchOn.
    • Entry 1: Required State Tag CIS.Button.SwitchOn; Interaction Object Action BP_PlaySoundAction; Sound S_Switcher_Cue; New State After Finish Action CIS.Button.SwitchOff.

    Leave Set New State After Finish Action on in both entries, so the switch changes state when the Action finishes, right after the click starts.

    Settings
    Interaction Settings
    Interaction Sides1 Array element
    Index [ 0 ]
    Interaction Angle Min0.0
    Interaction Angle Max0.0
    Angle Side
    Interaction Object Side Move HandlerNone
    Interaction Object Side Actions2 Array elements
    Index [ 0 ]CIS.Button.SwitchOff
    Required State TagCIS.Button.SwitchOff
    Interaction Object ActionBP_PlaySoundAction
    SoundS_Switcher_Cue
    New State After Finish ActionCIS.Button.SwitchOn
    Instancing PolicyDefault
    Net Execution PolicyAll Machines
    With Replication
    Index [ 1 ]CIS.Button.SwitchOn
    Required State TagCIS.Button.SwitchOn
    Interaction Object ActionBP_PlaySoundAction
    SoundS_Switcher_Cue
    New State After Finish ActionCIS.Button.SwitchOff
    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 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.Button.SwitchOff
    The interaction object settings of BP_MySwitch after steps 3 to 5
  6. Place it and play. Open /CharacterInteractionSystem/Demo/Levels/CISExampleMap, drag BP_MySwitch into the map near the demo character’s start, click Play, walk up to the switch and press E.

SettingWhat it does
Initial Object StateThe state the switch has when the game starts. The action the character runs depends on this state.
Interaction Angle Min and Interaction Angle MaxThe range of directions around the switch, measured from its forward direction, that the character can use it from.
Angle SideUses the part of the circle outside the range between the two angles. With both angles at 0, the switch works from every side.
Interaction DistanceHow close the character must stand to the switch, measured flat (height is ignored). The default is 300.
Required State TagThe state an action runs in. A state with no matching action cannot be used.
New State After Finish ActionThe state the switch takes when the action finishes.
  • Press E near the switch: it clicks and changes state. Press E again: it clicks back.
  • To see the side the switch can be used from, turn on With Debug in Game under Settings › Debug in the component’s settings, and play the map again.
The switch seen from the demo character's view, with the E | INTERACT prompt above it.
The switch from the character's view: the prompt shows it can be used.
The switch with With Debug in Game on. Yellow lines mark the sides the switch can be used from, which is all around it.
With Debug in Game on: the switch is usable from every side.
  • Nothing happens and the character is far away: the character must stand within Interaction Distance of the switch.
  • Nothing happens from any side: the character finds an object only while its trigger overlaps one of the object’s components. The Blueprint needs a component with collision that generates overlap events. A Static Mesh with the default collision has both. A Skeletal Mesh needs a Physics Asset, and Generate Overlap Events turned on.
  • Nothing happens and the character is not facing the switch: the demo character’s Interaction Angle is 120, and the switch must lie within half of that angle from the character’s forward direction.
  • Nothing happens although you are close and facing it: the current state has no action. Check the Required State Tag of both entries in step 5, and Initial Object State in step 3. 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.
  • The switch changes state but makes no sound: check that Sound is set in both entries.