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 references EnhancedInput.
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" to PublicDependencyModuleNames in *.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. The Combo trigger is deprecated in UE 5.8; don't
build new input on it.
- Add the mapping context to the player via the
EnhancedInputLocalPlayerSubsystem
(AddMappingContext(IMC, Priority)), usually in BeginPlay/possession.
- Bind actions to handlers by
ETriggerEvent (Triggered, Started, Completed, …) on
the EnhancedInputComponent, and read the FInputActionValue in 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)
void AMyCharacter::BeginPlay()
{
Super::BeginPlay();
if (APlayerController* PC = Cast<APlayerController>(GetController()))
if (ULocalPlayer* LP = PC->GetLocalPlayer())
if (auto* Subsystem = LP->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())
Subsystem->AddMappingContext(DefaultMappingContext, /*Priority*/ 0);
}
// DefaultMappingContext is a UPROPERTY(EditAnywhere) TObjectPtr<UInputMappingContext>.
2. Bind actions and read values
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
// The component is an Enhanced Input component when the plugin is active.
// (Don't name the parameter InputComponent: that shadows AActor::InputComponent.)
if (UEnhancedInputComponent* EIC = Cast<UEnhancedInputComponent>(PlayerInputComponent))
{
EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
EIC->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);
EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);
EIC->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);
}
}
void AMyCharacter::Move(const FInputActionValue& Value)
{
const FVector2D Axis = Value.Get<FVector2D>(); // Axis2D action
AddMovementInput(GetActorForwardVector(), Axis.Y);
AddMovementInput(GetActorRightVector(), Axis.X);
}
3. Blueprint equivalent (node flow)
Event BeginPlay
-> Get Controller -> Cast To PlayerController -> Get Local Player
-> Get EnhancedInputLocalPlayerSubsystem -> Add Mapping Context (IMC_Default, Priority 0)
// IA_Move is exposed as its own event node in the Character's Event Graph:
EnhancedInputAction IA_Move (Triggered)
-> Action Value (Vector2D) -> Add Movement Input (Forward * Y, Right * X)
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.
- Input works in single player but not on a client, or stops after respawn —
BeginPlay
ran before the controller possessed the pawn, so GetController() was null. Add the context
in an override of PawnClientRestart(), which runs on the owning client after possession
(Epic's Input Overview does this), or in the PlayerController.
- Link/compile error binding in C++ —
"EnhancedInput" isn't in Build.cs
PublicDependencyModuleNames.
- 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 the Get<T>() to the action's Value Type.
- Action fires every frame unexpectedly —
Triggered repeats while held for a Down trigger;
use Started/Completed for 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)
and "Input Overview"
(https://dev.epicgames.com/documentation/en-us/unreal-engine/input-overview-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.
1---2name: unreal-enhanced-input3description: >4 Set up player input in Unreal Engine 5 with Enhanced Input: Input Actions, Input Mapping5 Contexts, modifiers and triggers, adding the mapping context, and binding actions by6 ETriggerEvent. Use when wiring movement/look/jump input, creating IA_/IMC_ assets, binding7 in C++ or Blueprints, or when the user mentions Enhanced Input, Input Mapping Context,8 Input Action, IA_/IMC_, or ETriggerEvent.9metadata:10 source: https://skillmd.com/skills/junmystery/unreal-enhanced-input11---1213# Unreal Enhanced Input1415Wire player input the modern UE5 way with the **Enhanced Input** system: data-driven Input16Actions and Mapping Contexts instead of the legacy Project Settings axis/action mappings.17Targets **UE 5.8** (Enhanced Input is the default; legacy input is deprecated).1819## When to use2021- Use when adding movement/look/jump/fire input, creating Input Action (`IA_`) and Input22 Mapping Context (`IMC_`) assets, applying modifiers/triggers, adding a mapping context to a23 player, or binding actions in C++ or Blueprints.24- Use when the project has `IA_*`/`IMC_*` assets or references `EnhancedInput`.2526**When *not* to use:** engine-agnostic input *architecture* (rebinding strategy, buffering,27multi-device design) → `input-systems`. The Pawn/Character C++ those bindings live in →28`unreal-cpp-gameplay`.2930## Core workflow31321. **Enable the module/plugin.** Enhanced Input is on by default in UE5; for C++ binding add33 `"EnhancedInput"` to `PublicDependencyModuleNames` in `*.Build.cs`.342. **Create Input Actions (`IA_`).** Each has a **Value Type**: `Digital (bool)` for buttons,35 `Axis1D (float)` for triggers, `Axis2D (Vector2D)` for movement/look.363. **Create an Input Mapping Context (`IMC_`)** that maps keys/buttons to those actions. Use37 **Modifiers** to shape raw input (Negate, Swizzle Input Axis Values, Dead Zone) — e.g. WASD38 into one Axis2D needs Negate on A/S and a Swizzle on W/S. Use **Triggers** (Pressed, Hold,39 Tap) to decide *when* an action fires. The **Combo** trigger is deprecated in UE 5.8; don't40 build new input on it.414. **Add the mapping context to the player** via the `EnhancedInputLocalPlayerSubsystem`42 (`AddMappingContext(IMC, Priority)`), usually in `BeginPlay`/possession.435. **Bind actions** to handlers by `ETriggerEvent` (`Triggered`, `Started`, `Completed`, …) on44 the `EnhancedInputComponent`, and read the `FInputActionValue` in the handler.456. **Verify** in PIE; the Enhanced Input debugging console commands46 (`showdebug enhancedinput`) show which actions trigger and their values.4748## Patterns4950### 1. Add the mapping context (C++ Character)5152```cpp53void AMyCharacter::BeginPlay()54{55 Super::BeginPlay();56 if (APlayerController* PC = Cast<APlayerController>(GetController()))57 if (ULocalPlayer* LP = PC->GetLocalPlayer())58 if (auto* Subsystem = LP->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())59 Subsystem->AddMappingContext(DefaultMappingContext, /*Priority*/ 0);60}61// DefaultMappingContext is a UPROPERTY(EditAnywhere) TObjectPtr<UInputMappingContext>.62```6364### 2. Bind actions and read values6566```cpp67void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)68{69 Super::SetupPlayerInputComponent(PlayerInputComponent);7071 // The component is an Enhanced Input component when the plugin is active.72 // (Don't name the parameter InputComponent: that shadows AActor::InputComponent.)73 if (UEnhancedInputComponent* EIC = Cast<UEnhancedInputComponent>(PlayerInputComponent))74 {75 EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);76 EIC->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);77 EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);78 EIC->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);79 }80}8182void AMyCharacter::Move(const FInputActionValue& Value)83{84 const FVector2D Axis = Value.Get<FVector2D>(); // Axis2D action85 AddMovementInput(GetActorForwardVector(), Axis.Y);86 AddMovementInput(GetActorRightVector(), Axis.X);87}88```8990### 3. Blueprint equivalent (node flow)9192```text93Event BeginPlay94 -> Get Controller -> Cast To PlayerController -> Get Local Player95 -> Get EnhancedInputLocalPlayerSubsystem -> Add Mapping Context (IMC_Default, Priority 0)9697// IA_Move is exposed as its own event node in the Character's Event Graph:98EnhancedInputAction IA_Move (Triggered)99 -> Action Value (Vector2D) -> Add Movement Input (Forward * Y, Right * X)100```101102## Pitfalls103104- **No input at all** — the mapping context was never added (`AddMappingContext`), or the105 player has no Local Player yet. Add it after possession/`BeginPlay`.106- **Input works in single player but not on a client, or stops after respawn** — `BeginPlay`107 ran before the controller possessed the pawn, so `GetController()` was null. Add the context108 in an override of `PawnClientRestart()`, which runs on the owning client after possession109 (Epic's Input Overview does this), or in the PlayerController.110- **Link/compile error binding in C++** — `"EnhancedInput"` isn't in `Build.cs`111 `PublicDependencyModuleNames`.112- **WASD only moves on two keys / wrong axis** — Axis2D needs **Modifiers**: Negate on the113 negative keys (A, S) and a Swizzle Input Axis Values on the vertical (W/S) so both axes map114 correctly. Raw bindings without modifiers misbehave.115- **`Get<FVector2D>()` returns zero** — value-type mismatch: the Input Action is Digital/Axis1D,116 not Axis2D. Match the `Get<T>()` to the action's Value Type.117- **Action fires every frame unexpectedly** — `Triggered` repeats while held for a Down trigger;118 use `Started`/`Completed` for one-shots (jump press/release), or a Pressed/Tap trigger.119- **Two contexts fight** — multiple mapping contexts stack by Priority; a higher-priority120 context can consume a key. Manage with priorities and `RemoveMappingContext`.121122## References123124- For a complete first-/third-person C++ Character with Enhanced Input (header + source,125 including look/jump and a control-rebind note), read `references/cpp-setup.md`.126- Primary docs: "Enhanced Input in Unreal Engine"127 (`https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine`)128 and "Input Overview"129 (`https://dev.epicgames.com/documentation/en-us/unreal-engine/input-overview-in-unreal-engine`).130131## Related skills132133- `input-systems` — engine-agnostic input architecture and rebinding strategy.134- `unreal-cpp-gameplay` — the Character/Pawn class and module setup.135- `fps-shooter` — composes input with a 3D controller and shooting.