Set up Enhanced Input

The enhanced input system relies on two kinds of files in your editor:

  • Input action data asset
  • Input mapping context data asset

An input action data asset (e.g., “IA_Jump”) is how you bind an input to an action.

An input mapping context binds an input action to physical input from a human (e.g., “E” on your keyboard, scrolling the mouse wheel, movement along an axis from a pad or joystick, X/Y values from your theremin, etc).

Create a new input action data asset

UE5 screenshot, new input action data asset

Create a new input mapping context

UE5 screenshot, new input mapping context

Configuration steps

  • Player Controller Class:

    • Role: Map inputs to actions.
    • How: Create InputMappingContext, instantiate with your IMC file, then link to Enhanced Input Subsystem.
  • Character Class:

    • Role: Execute actions based on inputs.
    • How: Define UInputActions. For each:
      • Instantiate with associated input action file.
      • Bind to a member function in your character class inside SetupPlayerInputComponent.