Contextual Interaction System #3

Closed
opened 2026-08-31 14:13:29 +02:00 by Dolobarsch · 0 comments
Owner

Contextual Interaction System

Implement a reusable contextual interaction system in UE5 using an Interactable Interface.

Requirements

  • Create an Interactable Interface that can be implemented by any interactable Actor.
  • Detect the Actor/Collision Box the player is looking at.
  • If the Actor implements the Interface, display an interaction prompt:
    • [InteractionName] with [InteractableName]
    • Press [InteractionKey]
    • Only show Hold [InteractionKey] for Context Menu when a Context Menu is actually required.
  • Hide the prompt when the player looks away or leaves interaction range.
  • The Interface should provide the required interaction data and functionality, including:
    • InteractableName
    • AvailableInteractions
    • InteractionKey
    • Interaction execution
    • Context Menu actions where applicable

Interaction Rules

The number of available interactions determines how the interaction is handled:

  • 1 Interaction

    • Execute the interaction immediately.
    • No Context Menu.
  • 2 Interactions

    • The first interaction is the primary/default action.
    • The second interaction is executed directly through the secondary input/long press.
    • No Context Menu.
  • 3+ Interactions

    • Open a Context Menu on long press.
    • Display all available interactions in the Context Menu.

This should keep simple interactions fast while only introducing a Context Menu when it is actually necessary.

Example

One Interaction

Gather with Berry Bush
Press E

Two Interactions

Open with Wooden Chest
Press E
Hold E for secondary interaction

Three+ Interactions

Use with Workbench
Press E
Hold E for Context Menu

The system should be generic and reusable, so new interactable objects only need to implement the Interface and provide their S_Interactable data rather than requiring custom interaction logic.

# Contextual Interaction System Implement a reusable contextual interaction system in **UE5 using an Interactable Interface**. ## Requirements - Create an **Interactable Interface** that can be implemented by any interactable Actor. - Detect the Actor/Collision Box the player is looking at. - If the Actor implements the Interface, display an interaction prompt: - `[InteractionName] with [InteractableName]` - `Press [InteractionKey]` - Only show `Hold [InteractionKey] for Context Menu` when a Context Menu is actually required. - Hide the prompt when the player looks away or leaves interaction range. - The Interface should provide the required interaction data and functionality, including: - `InteractableName` - `AvailableInteractions` - `InteractionKey` - Interaction execution - Context Menu actions where applicable ## Interaction Rules The number of available interactions determines how the interaction is handled: - **1 Interaction** - Execute the interaction immediately. - No Context Menu. - **2 Interactions** - The first interaction is the primary/default action. - The second interaction is executed directly through the secondary input/long press. - No Context Menu. - **3+ Interactions** - Open a Context Menu on long press. - Display all available interactions in the Context Menu. This should keep simple interactions fast while only introducing a Context Menu when it is actually necessary. ## Example ### One Interaction > **Gather with Berry Bush** > Press **E** ### Two Interactions > **Open with Wooden Chest** > Press **E** > Hold **E** for secondary interaction ### Three+ Interactions > **Use with Workbench** > Press **E** > Hold **E** for Context Menu The system should be **generic and reusable**, so new interactable objects only need to implement the Interface and provide their `S_Interactable` data rather than requiring custom interaction logic.
Dolobarsch added this to the Milestone 1 — Project Foundation & Character Setup milestone 2026-08-31 14:13:29 +02:00
Dolobarsch added a new dependency 2026-08-31 14:15:29 +02:00
Dolobarsch removed a dependency 2026-08-31 14:15:44 +02:00
Dolobarsch self-assigned this 2026-09-05 00:39:23 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Dolobarsch/KingshearthLegacy#3