Skip to content

Motion 2.0 Preview 3

DANGER

IMPORTANT: Motion 2.0 Preview 3 is an architectural redesign. You cannot use it to upgrade a project from a previous version.

This breaking change makes a new integration necessary. The architecture simplifies later updates.

Breaking Changes

MotionPlayerState Removed

Preview 3 removes AMotionPlayerState entirely. Motion works with all PlayerStates that implement IAbilitySystemInterface.

What Changed

  • AMotionPlayerState class has been deleted
  • Motion components find the ASC through the standard UE5 IAbilitySystemInterface
  • Event-driven initialization via APawn::ReceiveControllerChangedDelegate with fallback retry timers for multiplayer scenarios where PlayerState replication is delayed
  • Motion finds attributes by name instead of by a specific AttributeSet class

Migration impact:

  • Projects must provide a PlayerState with GAS support.
  • The PlayerState must implement IAbilitySystemInterface.
  • The GameMode must use that project PlayerState class.
  • Motion will discover the ASC through the standard interface.

For current integration steps, see How to add Motion to a character.

Benefits

  • Use your existing PlayerState - Motion-specific base classes are not necessary
  • Use your own AttributeSet - Motion discovers attributes by name
  • Cleaner architecture - Standard UE5 patterns, no custom interfaces
  • Event-driven initialization - With fallback retry timers for multiplayer edge cases

Attribute Discovery

Motion finds attributes by name. UMotionAttributeSet is not necessary. Your AttributeSet can contain all attributes with the property names that Motion expects:

ComponentExpected Attribute Name
MotionWalkComponentWalkSpeed
MotionSprintingComponentWalkSpeed, Stamina, MaxStamina, StaminaRegenRate, StaminaDrainRate

If an expected attribute is missing, that specific feature gracefully degrades - other Motion features continue to work.

Type Renames

These types have new names for consistency with Unreal Engine conventions:

Previous NameNew Name
FStructMotionCurveFMotionCurve
GENERATED_USTRUCT_BODY()GENERATED_BODY() (in all structs)

Removed Gameplay Tags

Motion removed these gameplay tags from the tag hierarchy:

  • Motion.Input.* tags (Input binding tags)
  • Motion.Control.* tags (Control state tags)
  • Motion.Camera.DisableCollision tag

If you use these tags, define them in the project DefaultGameplayTags.ini.

Sound Component Restructuring

UMotionMovementSoundComponent extends UMotionComponentBase instead of UActorComponent. This matches UMotionBreathingComponent:

  • Event-driven surface detection replaces tick-based updates
  • Components participate in the Motion ASC discovery system
  • Consistent initialization pattern with other Motion components

Component Tuning Moved To Profiles

Versioned component profile DataAssets contain the movement, sound, and camera defaults. Components expose Profile as the primary editable setting. They copy profile values during play.

Motion supplies default profiles in /MotionCore/Motion/Profiles/v2_0_0:

  • DA_MotionWalkProfile_Default_v2_0_0
  • DA_MotionSprintProfile_Default_v2_0_0
  • DA_MotionCrouchProfile_Default_v2_0_0
  • DA_MotionJumpProfile_Default_v2_0_0
  • DA_MotionBreathingProfile_Default_v2_0_0
  • DA_MotionMovementSoundProfile_Default_v2_0_0
  • DA_MotionCameraProfile_Default_v2_0_0

Migration impact:

  • Duplicate a Motion profile into project content before changing movement, camera, sound, or GameplayEffect defaults.
  • Existing saved components stay pinned to the profile asset they reference.
  • Components with no saved profile load the corresponding Motion default profile.
  • Previous hand-edited inline component values do not convert into generated project profiles.

MOTION_LOG Macro Signature Change

The MOTION_LOG macro must have the component as the first parameter:

cpp
// Preview 2
MOTION_LOG(LogMotionSprinting, Log, TEXT("Sprint started"));

// Preview 3
MOTION_LOG(this, LogMotionSprinting, Log, TEXT("Sprint started"));

New Features

Versioned Component Profiles

Motion supplies component-specific profile DataAssets for movement, sound, and camera components. Profiles are primary assets and include validation details. Versioned defaults permit later releases to add profiles without changing project assignments.

See Component profiles for the customization and upgrade workflow.

Universal Attribute Discovery

New helper functions in UMotionAbilitySystemHelper:

cpp
// Find an attribute by name
FGameplayAttribute Attr = UMotionAbilitySystemHelper::FindAttributeByName(ASC, TEXT("WalkSpeed"));

// Get/Set attribute values by name
float Value;
UMotionAbilitySystemHelper::GetAttributeValueByName(ASC, TEXT("Stamina"), Value);
UMotionAbilitySystemHelper::SetAttributeValueByName(ASC, TEXT("Stamina"), 5.0f);

// Determine if an attribute exists
bool bHas = UMotionAbilitySystemHelper::HasAttributeByName(ASC, TEXT("JumpVelocity"));

Event-Driven ASC Initialization

Motion components bind to APawn::ReceiveControllerChangedDelegate for reliable ASC discovery. This prevents timing issues when the controller or PlayerState is unavailable at BeginPlay.

Context-Aware Logging

Enhanced logging infrastructure with automatic context prefixing:

cpp
// All MOTION_LOG macros must have Component as the first parameter
MOTION_LOG(this, LogMotionSprinting, Log, TEXT("Sprint started"));

// Output: [SERVER][MotionSprintingComponent] Sprint started
// Output: [CLIENT][MotionSprintingComponent] Sprint started

Features:

  • GetMotionLogPrefix() auto-extracts network role and component name
  • Network roles: [SERVER], [DEDICATED], [CLIENT], [SIMULATED], [STANDALONE]
  • Zero overhead in Shipping builds (compiled out via #if !UE_BUILD_SHIPPING)

Gameplay Debugger Category

New "Motion" category in the UE5 Gameplay Debugger (' key in-game):

  • Active component states (Walk, Sprint, Crouch, Jump, etc.)
  • Movement speeds and stamina values
  • Active GameplayEffects and GameplayTags
  • Camera curve information

UCurveVector for Camera Effects

Camera curves use UCurveVector assets instead of inline FRuntimeVectorCurve. Benefits:

  • Shareable curve assets across components
  • Editor preview support
  • Better workflow for artists

FName Curve Identifiers

Curve identifiers switched from FString to FName for identifier storage and comparison.

Attribute System Enhancements

Improved attribute handling with better prediction support:

  • Pre/post attribute handling - Movement attributes are clamped and synchronized to CharacterMovementComponent properties
  • Local prediction handling - bIsLocallyPredicting flag tracks prediction state per component
  • Proportional crouch speed - Speed adjusts based on capsule height ratio
  • ClearLocalPredictionState helper - Clean reset of prediction flags

New Utilities

New helper structures and functions:

RemoveTagEffectWithFallback - Resilient tag cleanup that handles GameplayEffect removal and loose tag removal:

cpp
// Safely removes tag whether applied via GE or loose tag
UMotionAbilitySystemHelper::RemoveTagEffectWithFallback(Character, EffectHandle, TagToRemove);

Platform-relative velocity helpers:

cpp
// Get velocity relative to moving platform (for conveyor belts, elevators)
FVector RelativeVel = UMotionAbilitySystemHelper::GetPlatformRelativeVelocity(Character->GetCharacterMovement());
float RelativeSpeed = UMotionAbilitySystemHelper::GetPlatformRelativeSpeed(Character->GetCharacterMovement());

Performance Improvements

Event-Based Updates

  • Event-based surface detection (traces only on footstep, not every tick)
  • Event-driven breathing component (reduced CPU usage vs tick-based)
  • RPC rate limiting on sprint and jump requests

Animation System Optimizations

  • Time-based throttling replaces frame-counter timing for consistent behavior across framerates
  • Ground trace throttling reduces raycast frequency during locomotion
  • Transient UPROPERTY markers on runtime-cached pointers (prevents unnecessary serialization)

ASC Lookup

  • ASC lookup uses IAbilitySystemInterface first (fastest path for conforming classes)

Memory Optimizations

  • FIFO eviction for logged actors. The limit is 100 entries.
  • Optimized log levels (operational messages demoted to Verbose)

Bug Fixes

  • Fixed ASC discovery timing issues in multiplayer
  • Removed dependency on specific PlayerState class
  • Simplified component initialization flow
  • Fixed initialization timeout messages (5s warning, 10s error)
  • Fixed multiplayer client ASC initialization race condition
  • Fixed sprint stamina comparison (normalized vs raw values)
  • Fixed startup walk speed ownership so MotionWalkComponent initializes CMC speed and the server-owned WalkSpeed base value.

Motion - Advanced First Person Character Controller