rocket-launchInteraction System

📌 Overview

The Interaction System allows players to interact with objects in the game world (e.g., items, chests, doors, NPCs) via a defined interface. It supports both single-use and persistent interactions, and can be extended to support complex behaviors (dialogues, puzzles, etc.).

Blueprint Class
Description

BPI_Interactable (Interface)

Interface that interactable actors must implement.

AC_Interaction (Component)

Component attached to player controller to detect interactable objects.

BPI_ObjectInteraction (Interface)

Interface that is used by the Player Controller to Start or End Interaction with the current object.

AC_Interactable (Component)

Component attached to the Interactable Actor, forwards Interaction events through BPI_Interactable.

🧩 Interactable Component

This component enables any actor to become interactable. Attach this to an actor to define how and when players can interact with it. It also forwards events via BPI_Interactable Interface to the owning actor.

🔧 Customizable Parameters

Parameter
Description

bCanInteract

Boolean

Master toggle for allowing interaction

DefaultInteractionText

Text

Custom prompt text ("Press E to open", etc.)

InteractionMethod

Enum: Press, Hold, Mash

Defines how the player must input to trigger the interaction.

MaxKeyTimeDown

Float

Time required (in seconds) for Hold interactions

MashingKeyRetriggerableTime

Float

Time required (in seconds) for Mash interactions

InteractionPersistence

Enum: Persistent, One Time, Temporary Disable, On Target Value Reached

Determines what happens to the interaction after it's triggered.

LinkedInteractables

Map [Actor | Linked Interactable Struct]

Map of linked interactables and their required conditions. If all linked conditions are met, an interaction is triggered on this component.

InteractableValue

Integer

Current value of the interactable. This value can change at runtime through interaction.

InteractableTargetValue

Integer

Optional target value for comparison. Can be used to check if the current value has reached a desired state.

InteractableLimitValue

Integer

Defines the maximum allowed value for the interactable. Used to clamp or restrict changes.

bIsReinitializable

Boolean

Allows the interaction to be re-initialized after its initial setup.

bRequireActivationToEndInteraction

Boolean

If true, the interaction can only be ended after it has been activated. In most cases it should be set to True.

bOnlyStartWhenInactive

Boolean

Useful when don't want to trigger interaction until becoming Inactive (On End Interaction)

🧩 BPI_Interactable – Interaction Interface

The BPI_Interactable Blueprint Interface is used by the AC_Interactable component to forward interaction events to the owning actor. This allows developers to keep logic modular, clean, and easily override interaction behavior per object. It Supports both authoritative (server) and client-side (local) interaction logic.

📜 Interface Events

Event Name
Description

StartInteraction

Called when interaction begins (networked)

EndInteraction

Called when interaction completes (networked)

RemoveInteraction

Called if interaction is removed (e.g., player takes all the items from chest)

ClientStartInteraction

Called locally when interaction starts (client-side only)

ClientEndInteraction

Called locally when interaction ends (client-side only)

ClientPreInteraction

Called locally before the Interaction Start event (client-side only)

CanBeInteractedWith

Used to check if Player can interact with the actor. Outputs a boolean value.

GetInteractableReferences

Called upon initialization - requires connecting InteractableArea, Widget HighlightableObjects to it

🧠 BPI_ObjectInteraction - Interaction Interface

This interface is used by the Player Controller to start or end interaction with a target object. It ensures interaction requests are cleanly routed to the component layer, with Server and Client event separation for multiplayer support.

🧾 Interface Events

Function Name
Description

InitializeInteractionWithObject

Initializes Interaction on Client side - calls Interaction Event on the Interactable Component

StartInteractionWithObject

Called by client → sent to server to initiate interaction (authoritative)

EndInteractionWithObject

Ends interaction on the server by calling End Interaction Event on the Interactable Component

RemoveInteractionFromObject

Removes interaction on the server by calling the Remove Interaction Event on the Interactable Component

GetCurrentInteractableObject

Gets the current Interactable Actor reference

Last updated