Skip to content

How to add Motion to a character

Use this guide when you already have a project character and want to add Motion components to it.

Prerequisites

  • Unreal Engine 5.6 or later
  • MotionCore enabled in the project
  • A PlayerState that implements IAbilitySystemInterface
  • An AbilitySystemComponent and AttributeSet available from that PlayerState
  • Enhanced Input configured for your project

Add the core components

  1. Open your character Blueprint or C++ class.
  2. Add the movement components you need:
    • MotionWalkComponent
    • MotionSprintingComponent
    • MotionCrouchingComponent
    • MotionJumpComponent
  3. Add support components when the character needs them:
    • MotionCameraEventBus
    • MotionCameraComponent
    • MotionBreathingComponent
    • MotionMovementSoundComponent
    • MotionHeldItemComponent
  4. Configure each component's GameplayEffect references in the Details panel.

Initialize GAS

If your project initializes GAS manually, initialize the character/ASC pair after possession or once PlayerState is available:

cpp
UMotionAbilitySystemHelper::InitializeCharacterAbilitySystemWithAttributeSet(
    this,
    UMotionAttributeSet::StaticClass(),
    true
);

Projects with a custom AttributeSet can use Motion's attribute discovery as long as the expected attribute names are available.

Bind input

  1. Create or reuse Enhanced Input actions for sprint, crouch, and jump.
  2. Add the mapping context from your PlayerController or character setup.
  3. Bind actions through the component helper functions:
cpp
MotionSprintComponent->BindSprintInput(SprintAction);
MotionCrouchComponent->BindCrouchInput(CrouchAction);
MotionJumpComponent->BindJumpInput(JumpAction);

Use the explicit Bind*InputWithComponent variants when your project owns the UEnhancedInputComponent lookup.

Set up animation state

For Motion's built-in animation state mapping:

  1. Set your Animation Blueprint parent class to UMotionAnimInstance.
  2. Map Motion GameplayTags to Blueprint variables in GameplayTagPropertyMap.
  3. Use the mapped variables in state machine transitions and blend spaces.

See How to set up MotionAnimInstance for the detailed animation workflow.

Verify the character

  1. Start PIE.
  2. Confirm walking, sprinting, crouching, and jumping work locally.
  3. Enable Motion logging if a component does not initialize:
bash
log LogMotionCore Verbose
showdebug abilitysystem
  1. For multiplayer projects, follow How to test Motion multiplayer.

Motion - Advanced First Person Character Controller