Skip to content

Motion 2.0 Preview 1

This version refactors Motion for modularity, integration, multiplayer support, and standard Unreal Engine practices.

DANGER

This version is for evaluation only. Do not use it to upgrade an existing project.

Major Changes and Refactoring

  • Gameplay Ability System (GAS) Integration:
    • GAS Gameplay Tags, Gameplay Abilities, and Gameplay Effects control state and attribute changes. This design uses built-in GAS replication.
    • Components such as UMotionCrouchComponent primarily react to replicated GAS tags.
    • Removed the custom UMotionAbilitySystemComponent. Use the standard UAbilitySystemComponent or a project subclass.
    • Replicated crouch and similar features must have a configured ASC and AttributeSet.
  • Decoupled Components: Components are designed to be more self-contained and have fewer dependencies on specific base classes or sibling components.
  • Input System Overhaul:
    • The project controls input connections in the Character or PlayerController SetupPlayerInputComponent function. Use the standard UEnhancedInputComponent.
    • Removed UMotionInputComponent. Helper function BindActionByTag (which relied on UMotionInputConfig) removed from UMotionAbilitySystemHelper.
    • Removed the UMotionInputConfig Data Asset. Projects manage input action references directly or with project configuration.
  • Base Class Removal (AMotionCharacter):
    • Removed the AMotionCharacter C++ class from the plugin source. Direct inheritance is not necessary or recommended.
    • Inherit from ACharacter or a project base character. Add Motion components manually.
    • The supplied B_Motion2Character Blueprint is the primary component setup example.
  • Movement Component Removal (UMotionCharacterMovementComponent):
    • Removed the custom UMotionCharacterMovementComponent class entirely.
    • Use the standard UCharacterMovementComponent.
    • GAS Attributes and Gameplay Effects control additive speed modifiers. Project code must synchronize the final attribute value with CMC MaxWalkSpeed. Gameplay Effects can also modify the speed attribute for State.Movement.Halted. Motion supplies UMotionSpeedSyncComponent as an example of this behavior.
  • Camera Component Refactoring (UMotionCameraComponent):
    • Removed the dependency on the separate UMotionCurveManager component.
    • The component manages and evaluates its internal curve arrays in TickComponent.
    • Added Blueprint-callable functions for managing these internal curves dynamically.
  • Crouch Component Refactoring (UMotionCrouchComponent):
    • Removed bIsInCrouch state management. The component reacts to State.Movement.Crouching on the ASC.
    • Removed direct input handling. Input must start a Gameplay Ability.
    • Removed direct speed changes. A Gameplay Ability applies and removes speed Gameplay Effects.
    • CanUncrouch function remains for server-side ability checks.
  • Native Gameplay Tags:
    • Implemented standard native Gameplay Tag definition (MotionGameplayTags.h/.cpp, Config/DefaultGameplayTags.ini, initialization in StartupModule).
    • Code references tags through the static getter, for example, FMotionGameplayTags::Get().State_Movement_Crouching.
  • Asset Referencing: Consistently uses TSoftObjectPtr for asset references (UInputAction, UMetaSoundSource) in configuration structs/assets where appropriate.
  • Extensibility: Key component functions marked virtual.
  • Code Quality: Added more logging (UE_LOG) and improved comments.
  • Sprint Component Refactoring UMotionSprintComponent: Added a C++ sprint component (Source/MotionCore/Components/MotionSprintComponent.h/.cpp) designed to work with GAS. It reacts to the State.Movement.Sprinting tag, primarily for triggering cosmetic effects (like camera curves) or providing a hook point. Does not manage speed.
  • Movement Sound Component Refactoring UMotionMovementSoundComponent:
    • Added optional throttling for footstep and landing effects (MinTimeBetweenFootsteps, MinTimeBetweenLandings).
    • Added sphere-overlap parameters for environmental context (EnvironmentCheckRadius, EnvironmentCheckChannel). These overlaps do not map to environmental Gameplay Tags.
    • Passes character Effect Profile tags (Motion.Character.EffectProfile.*) from the ASC to the Gameplay Cue via AggregatedSourceTags.
    • Uses FMotionMovementEffectContext to pass movement data through Parameters.EffectContext. The context also stores the resolved FSurfaceEffectAssets row.
  • Updated FMotionMovementEffectContext Struct: Added EffectAssetsData pointer member.
  • New UMotionGameplayCueNotify_Static Base Class: Added a C++ base class for the generic movement FX cue. It parses context, selects sound variations, and creates sound. Gameplay Cue Blueprints can inherit from this class.
  • New Gameplay Tags: Added tags for Effect Profiles (Motion.Character.EffectProfile.*) and Environmental Context (Motion.Environment.State.*, Motion.Environment.Location.*) to FMotionGameplayTags.
  • Jump Component Refactor UMotionJumpComponent: Added a C++ jump component (Source/MotionCore/Components/MotionJumpComponent.h/.cpp) designed to work with GAS. It reacts to the State.Movement.Jumping tag, primarily for triggering cosmetic effects (like camera curves). Does not manage jump height/speed.
  • Breathe Component Refactor UMotionBreatheComponent: Converted from Blueprint. It evaluates velocity and controls a breathing curve on UMotionCameraComponent. Removed the UMotionCurveManager and AMotionCharacter delegate dependencies.
  • New EMotionAbilityInputID Enum: Added a C++ enum (Source/MotionCore/AbilitySystem/MotionAbilityInputID.h) for defining logical ability input IDs, used for binding Enhanced Input to GAS.
  • New/Updated UMotionAbilitySystemHelper: Added static Blueprint-callable helper functions:
    • BindEnhancedInputActionToASC: Connects Enhanced Input events to ASC::AbilityLocalInputPressed/Released with an EMotionAbilityInputID.
    • GetEnhancedInputComponentFromActor: Gets and casts the input component from an actor.
    • TriggerAbilityInputReleased: Explicitly calls ASC::AbilityLocalInputReleased (workaround for potential WaitInputRelease issues).
  • Updated UMotionSprintComponent: Added functions and state variables for gradual ramp-down logic from a Gameplay Ability.

Deprecations / Removals

  • BPC_WalkComponent.uasset: Removed. GAS Attributes control base walk speed. Other components or the AnimBP control cosmetic behavior.
  • BPC_BreathComponent.uasset: Replaced by the refactored C++ UMotionBreatheComponent. Add UMotionCameraComponent to the character and configure the breathing curve.
  • BPC_SprintComponent.uasset: Replaced by the C++ UMotionSprintComponent. Move custom logic and use a corresponding GA_Character_Sprint Gameplay Ability.
  • BPC_JumpComponent.uasset: Replaced by the C++ UMotionJumpComponent. Move custom logic and use a corresponding GA_Character_Jump Gameplay Ability.
  • BPC_MovementSoundComponent.uasset: Replaced by the C++ UMotionMovementSoundComponent. Create a SurfaceEffectsTable and a generic Gameplay Cue Blueprint. Update the Animation Notifies.
  • FStructMovementSound: Replaced by FSurfaceEffectAssets.
  • EMovementSoundTypes: Enum removed from MotionEnums.h (replaced by Gameplay Tags).
  • UMotionInputComponent: Removed entirely. Also removed BindActionByTag from UMotionAbilitySystemHelper. Use the standard UEnhancedInputComponent.
  • UMotionAbilitySystemComponent: Removed entirely. Use the standard UAbilitySystemComponent or a project subclass. Removed its UMotionAnimInstance dependency.
  • AMotionPlayerController: Removed entirely. Use the standard APlayerController.
  • AMotionGameMode / B_MotionGameMode.uasset: Removed entirely (.h, .cpp, .uasset). A specific GameMode is not necessary.
  • UMotionCurveManager: Removed entirely (.h and .cpp). Functionality integrated into UMotionCameraComponent.
  • AMotionCharacter: Removed entirely (.h and .cpp). Functionality moved to components or documentation examples.
  • UMotionCharacterMovementComponent: Removed entirely. Use the standard UCharacterMovementComponent. Project GAS Attributes, Effects, and Abilities control speed and state.
  • UMotionInputConfig: Removed entirely (.h and .cpp). Users manage input actions directly.
  • UMotionCrouchComponent's internal state management, direct input handling (SetCrouch, DoCrouch, DoUncrouch), and direct speed modification.
  • Removed hard TObjectPtr references to UInputAction and UMetaSoundSource in config/structs (replaced with TSoftObjectPtr).

Known Issues / Important Notes

  • Motion uses standard GAS and Enhanced Input workflows for character integration and replication.
  • Projects control input connections and ability grants. See the example code and documentation.
  • Projects supply Gameplay Abilities and Gameplay Effects that control component logic through GAS tags and attributes.
  • Create an FSurfaceEffectAssets DataTable and a Gameplay Cue Blueprint for UMotionMovementSoundComponent.
  • The example Blueprint B_Motion2Character inherits directly from ACharacter and demonstrates C++ components, GAS integration, and input binding.

Motion - Advanced First Person Character Controller