X157 Dev Notes

One simulant attempts to share insight with others.

Lyra Input Overview

Lyra combines different UE5 systems and plugins together to coordinate a coherent input strategy.

For a 5 minute high level conceptual overview, see my YT video: UE5 Lyra Input Overview

Key Concepts

Input Handling Overview

Lyra uses Common UI together with Enhanced Input to manage Player Input. Be familiar with both.

These UE5 plugins are integrated via the Lyra UI Policy, which defines a HUD as being comprised of prioritized layers of Activatable Widgets.

The Escape key (the “back” button) activates the Game Menu widget, which suspends Player Game Input while the menu is open, for example.

Common UI controls if, when and how input makes it to the Game. If/when you want to explicitly change input modes in your Game, you must use the Common UI Action Router to do so.

When Activatable Widgets activate and deactivate, they can optionally change the input mode and/or focus themselves for input to support MKB, Gamepad, VR controllers, etc. The settings are all customizable by input device and platform.

In particular, they should agree on the value of Get Desired Input Config, hopefully via a shared implementation.

When no Activatable Widget is modifying the input mode, the input flows to the Game itself via Enhanced Input, as triggered by any active Input Mapping Contexts at the given point in Playtime.

Input Mapping Contexts (IMC)

Input Mapping Context management during Gameplay allows you to activate or deactivate any given IMC based on the context. For example, possessing a Vehicle or ejecting from it might change the active IMC compared to movement on foot.

Lyra uses Game Feature Actions to initialize default IMCs, and you can add your own IMC swapping logic to dynamically change inputs during Gameplay.

Player Input is managed by the Lyra Hero Component

The Lyra Hero Component activates the Native & Ability Input Actions for the Player Pawn.

References