Concept: The Three Layers
Interaction is split across three plugins so that being interactable never drags in the whole system - and so the mechanism works without any particular ability framework on top.
| Layer | Plugin | Holds |
|---|---|---|
| Contract | CrimsonInteraction (this plugin) | ICrimsonInteractableTarget, ICrimsonInteractionInstigator, FCrimsonInteractionOption, FCrimsonInteractionQuery, FCrimsonInteractionOptionBuilder (C++), the conditions, UCrimsonInteractionDurationContext. |
| Mechanism | CrimsonInteraction (this plugin) | The scan / grant ability tasks, UCrimsonInteractionStatics (incl. TriggerInteractionOption), UCrimsonInteractionDurationContext, the target actor, collision profiles, and UCrimsonInteractionSettings. Plus Crimson Basic Interact, the one instant interact ability, and its default event tag Ability.Interaction.Activate. No widgets. |
| Turnkey abilities & UI | CrimsonCore (optional - compiles only with all Crimson plugins installed) | Prebuilt interact / duration / handler abilities, ACrimsonInteractableActor, the HUD prompt widget, world indicators, the options-changed message, and the Ability.Interaction.* / InputTag.Interact tags. The Quick Start builds the same layer by hand. |
Why the abilities are not in this plugin
CrimsonCore's granted abilities derive from
UCrimsonGameplayAbility so UCrimsonAbilitySystemComponent's input/group-cancel logic can manage them - and CrimsonInteraction cannot depend on the ability-system plugin. The mechanism here is deliberately GAS-base-agnostic: its tasks and statics work with plain UGameplayAbility subclasses, which is exactly what Crimson Basic Interact and How-To: Write Your Own Interact Ability use.What it means for you
- To be interactable, implement
ICrimsonInteractableTarget- nothing else. - To drive interaction, grant Crimson Basic Interact (Quick Start), or author your own
UGameplayAbilityaround this plugin's tasks (How-To: Write Your Own Interact Ability). - To show progress UI, bind
UCrimsonInteractionDurationContext::OnProgressChanged. - Event tags are conventions: this plugin registers only
Ability.Interaction.Activate(Crimson Basic Interact's default event, the same string CrimsonCore uses). Any others you define yourself (How-To: Write Your Own Interact Ability step 1); using CrimsonCore's strings keeps content portable between the two worlds.