Unreal Enhanced Input
Wire player input the modern UE5 way with the Enhanced Input system: data-driven Input Actions and Mapping Contexts instead of the legacy Project Settings axis/action mappings. Targets UE 5.8 (Enhanced Input is the default; legacy input is deprecated).
When to use
- Use when adding movement/look/jump/fire input, creating Input Action (
IA_) and Input Mapping Context (IMC_) assets, applying modifiers/triggers, adding a mapping context to a player, or binding actions in C++ or Blueprints. - Use when the project has
IA_*/IMC_*assets or referencesEnhancedInput.
When not to use: engine-agnostic input architecture (rebinding strategy, buffering,
multi-device design) → input-systems. The Pawn/Character C++ those bindings live in →
unreal-cpp-gameplay.
Core workflow
- Enable the module/plugin. Enhanced Input is on by default in UE5; for C++ binding add
"EnhancedInput"toPublicDependencyModuleNamesin*.Build.cs. - Create Input Actions (
IA_). Each has a Value Type:Digital (bool)for buttons,Axis1D (float)for triggers,Axis2D (Vector2D)for movement/look. - Create an Input Mapping Context (
IMC_) that maps keys/buttons to those actions. Use Modifiers to shape raw input (Negate, Swizzle Input Axis Values, Dead Zone) — e.g. WASD into one Axis2D needs Negate on A/S and a Swizzle on W/S. Use Triggers (Pressed, Hold, Tap) to decide when an action fires. - Add the mapping context to the player via the
EnhancedInputLocalPlayerSubsystem(AddMappingContext(IMC, Priority)), usually inBeginPlay/possession. - Bind actions to handlers by
ETriggerEvent(Triggered,Started,Completed, …) on theEnhancedInputComponent, and read theFInputActionValuein the handler. - Verify in PIE; the Enhanced Input debugging console commands
(
showdebug enhancedinput) show which actions trigger and their values.
Patterns
1. Add the mapping context (C++ Character)
2. Bind actions and read values
3. Blueprint equivalent (node flow)
Pitfalls
- No input at all — the mapping context was never added (
AddMappingContext), or the player has no Local Player yet. Add it after possession/BeginPlay. - Link/compile error binding in C++ —
"EnhancedInput"isn't inBuild.csPublicDependencyModuleNames. - WASD only moves on two keys / wrong axis — Axis2D needs Modifiers: Negate on the negative keys (A, S) and a Swizzle Input Axis Values on the vertical (W/S) so both axes map correctly. Raw bindings without modifiers misbehave.
Get<FVector2D>()returns zero — value-type mismatch: the Input Action is Digital/Axis1D, not Axis2D. Match theGet<T>()to the action's Value Type.- Action fires every frame unexpectedly —
Triggeredrepeats while held for a Down trigger; useStarted/Completedfor one-shots (jump press/release), or a Pressed/Tap trigger. - Two contexts fight — multiple mapping contexts stack by Priority; a higher-priority
context can consume a key. Manage with priorities and
RemoveMappingContext.
References
- For a complete first-/third-person C++ Character with Enhanced Input (header + source,
including look/jump and a control-rebind note), read
references/cpp-setup.md. - Primary docs: "Enhanced Input in Unreal Engine"
(
https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine).
Related skills
input-systems— engine-agnostic input architecture and rebinding strategy.unreal-cpp-gameplay— the Character/Pawn class and module setup.fps-shooter— composes input with a 3D controller and shooting.
