Skip to content

Motion 2.0 Preview 2

This second preview introduced the component-based Motion 2.0 architecture. It supports existing ACharacter subclasses, multiplayer, and GAS integration.

DANGER

IMPORTANT: Motion 2.0 Preview 2 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.

Universal Compatibility Achieved

Motion 2.0 Preview 2 successfully implements true universal compatibility:

  • No Inheritance Necessary: Works with all ACharacter subclasses. Add Motion components to the character.
  • Standard UE5 Components: Uses standard UCharacterMovementComponent and UAbilitySystemComponent
  • Pure Component Composition: All functionality delivered through modular components
  • Automatic Discovery: Components automatically find and integrate with necessary actors and systems

Component Architecture

Base Component System

  • UMotionComponentBase: Foundation for all Motion components providing:

    • Automatic ASC initialization with retry mechanism (up to 20 attempts)
    • Input binding with retry system for multiplayer timing issues
    • Automatic component caching and discovery
    • Shared input binding and camera-curve identifier helpers

    Network RPC validation, rate limiting, and camera effects remain responsibilities of the derived components that use them.

Movement Components (All C++ with Blueprint exposure)

  • UMotionBreathingComponent: Velocity-based camera breathing effects
  • UMotionWalkComponent: Base movement speed and directional multiplier management
  • UMotionSprintingComponent: Advanced sprint system with stamina and direction validation
  • UMotionJumpComponent: Multi-jump support with coyote time and server validation
  • UMotionCrouchingComponent: Hybrid crouch system with smooth transitions
  • UMotionMovementSoundComponent: Surface-based audio with MetaSound integration

GAS Integration

  • UMotionAttributeSet: Comprehensive attribute set with automatic CMC syncing

    • Movement: WalkSpeed, SprintSpeed, JumpVelocity
    • Stamina: Stamina, MaxStamina, StaminaRegenRate, StaminaDrainRate
    • WalkSpeed and JumpVelocity sync to CMC properties through attribute-change handlers
    • Full replication support with proper attribute macros
  • AMotionPlayerState: Necessary for GAS persistence across respawns

    • Owns the AbilitySystemComponent for proper replication
    • Handles attribute initialization and persistence
    • Compatible with all GameModes when you set PlayerStateClass

Enhanced Camera System

  • UMotionCameraComponent: Advanced first-person camera with:
    • Integrated curve evaluation system for location and rotation
    • Smooth camera-height interpolation with FMath::FInterpTo
    • Support for additive camera effects from all components
    • Ground-relative camera positioning during capsule-height changes

Multiplayer Improvements

Client Prediction and Server Reconciliation

  • Hybrid Movement System: Combines UE5 built-in movement with component-owned GAS state and local response
  • Immediate Response: Walk and sprint speed prediction plus native local crouch and jump response
  • Server Authority: Server validates sprint, crouch, and jump requests
  • Speed Reconciliation: Predicted walk and sprint speed state is reconciled when GAS attributes update

Network Optimizations

  • GameplayEffect-based Tag Replication: Efficient state synchronization
  • Crouch RPC Rate Limiting: Crouch validation enforces a per-component minimum request interval
  • Smart Landing Detection: Resolves jump count synchronization issues
  • Attribute-based Speed Sync: Direct CMC property updates via GAS

Stamina System

  • Hysteresis Prevention: Smart exhaustion handling prevents sprint cycling
  • Smooth Regeneration: Configurable delay and regen rate via attributes
  • Multiplayer Ready: Full replication through GAS attributes

Critical Bug Fixes

Multiplayer Issues Resolved

  • Fixed infinite jump exploit through proper server-side validation
  • Resolved RPC processing failures preventing server execution
  • Fixed sprint/crouch state conflicts causing animation issues
  • Eliminated capsule sync issues causing camera stuttering
  • Fixed GameplayEffect application failures on clients

Movement System Fixes

  • Eliminated camera position jumps when crouching
  • Fixed multi-jump direction with character velocity instead of input
  • Resolved coyote time double-declaration
  • Fixed stamina not properly sourcing from GAS attributes
  • Corrected crouch speed penalty application

Input and Initialization

  • Added retry mechanisms for input binding in multiplayer
  • Fixed ASC initialization race conditions
  • Resolved component discovery timing issues
  • Added validation for all RPC requests

Included Gameplay Effects

Motion 2.0 Preview 2 includes pre-configured Gameplay Effects for all movement states:

Movement Speed Effects

  • GE_Motion_WalkSpeed: Base walking speed modifier
  • GE_Motion_SprintSpeed: Sprint speed increase
  • GE_Motion_CrouchSpeed: Crouch speed reduction
  • GE_Motion_JumpVelocity: Jump height modifier

State Tags

  • GE_Motion_Walking, GE_Motion_Sprinting, GE_Motion_Crouching, GE_Motion_Jumping
  • GE_Motion_WantsToSprint, GE_Motion_WantsToCrouch, GE_Motion_WantsToJump
  • GE_Motion_BreathingActive: Camera breathing effect state

Stamina Effects

  • GE_Motion_SprintStaminiaDrain: Continuous stamina consumption while sprinting (asset name as shipped in Preview 2)
  • GE_Motion_SprintStaminiaRegen: Stamina regeneration when not sprinting (asset name as shipped in Preview 2)
  • GE_Motion_SprintStaminiaRegenDelay: Delay before regeneration begins (asset name as shipped in Preview 2)

Migration Guide

To integrate Motion 2.0 Preview 2 into your project:

  1. Remove Previous Versions: Delete all previous Motion content
  2. Install Fresh: Add Motion 2.0 Preview 2 to your project
  3. Configure GameMode: Set PlayerStateClass to AMotionPlayerState::StaticClass()
  4. Add Components: Add desired Motion components to your character class
  5. Setup Input: Bind Enhanced Input actions to Motion components
  6. Configure GAS: Motion components will automatically integrate with your ASC

Known Issues

No Preview 2-specific known issues are listed in this changelog.

Motion - Advanced First Person Character Controller