Appearance
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
UMotionCrouchComponentprimarily react to replicated GAS tags. - Removed the custom
UMotionAbilitySystemComponent. Use the standardUAbilitySystemComponentor 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
SetupPlayerInputComponentfunction. Use the standardUEnhancedInputComponent. - Removed
UMotionInputComponent. Helper functionBindActionByTag(which relied onUMotionInputConfig) removed fromUMotionAbilitySystemHelper. - Removed the
UMotionInputConfigData Asset. Projects manage input action references directly or with project configuration.
- The project controls input connections in the Character or PlayerController
- Base Class Removal (
AMotionCharacter):- Removed the
AMotionCharacterC++ class from the plugin source. Direct inheritance is not necessary or recommended. - Inherit from
ACharacteror a project base character. Add Motion components manually. - The supplied
B_Motion2CharacterBlueprint is the primary component setup example.
- Removed the
- Movement Component Removal (
UMotionCharacterMovementComponent):- Removed the custom
UMotionCharacterMovementComponentclass 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 forState.Movement.Halted. Motion suppliesUMotionSpeedSyncComponentas an example of this behavior.
- Removed the custom
- Camera Component Refactoring (
UMotionCameraComponent):- Removed the dependency on the separate
UMotionCurveManagercomponent. - The component manages and evaluates its internal curve arrays in
TickComponent. - Added Blueprint-callable functions for managing these internal curves dynamically.
- Removed the dependency on the separate
- Crouch Component Refactoring (
UMotionCrouchComponent):- Removed
bIsInCrouchstate management. The component reacts toState.Movement.Crouchingon 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.
CanUncrouchfunction remains for server-side ability checks.
- Removed
- Native Gameplay Tags:
- Implemented standard native Gameplay Tag definition (
MotionGameplayTags.h/.cpp,Config/DefaultGameplayTags.ini, initialization inStartupModule). - Code references tags through the static getter, for example,
FMotionGameplayTags::Get().State_Movement_Crouching.
- Implemented standard native Gameplay Tag definition (
- Asset Referencing: Consistently uses
TSoftObjectPtrfor 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 theState.Movement.Sprintingtag, 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 viaAggregatedSourceTags. - Uses
FMotionMovementEffectContextto pass movement data throughParameters.EffectContext. The context also stores the resolvedFSurfaceEffectAssetsrow.
- Added optional throttling for footstep and landing effects (
- Updated
FMotionMovementEffectContextStruct: AddedEffectAssetsDatapointer member. - New
UMotionGameplayCueNotify_StaticBase 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.*) toFMotionGameplayTags. - Jump Component Refactor
UMotionJumpComponent: Added a C++ jump component (Source/MotionCore/Components/MotionJumpComponent.h/.cpp) designed to work with GAS. It reacts to theState.Movement.Jumpingtag, 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 onUMotionCameraComponent. Removed theUMotionCurveManagerandAMotionCharacterdelegate dependencies. - New
EMotionAbilityInputIDEnum: 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 toASC::AbilityLocalInputPressed/Releasedwith anEMotionAbilityInputID.GetEnhancedInputComponentFromActor: Gets and casts the input component from an actor.TriggerAbilityInputReleased: Explicitly callsASC::AbilityLocalInputReleased(workaround for potentialWaitInputReleaseissues).
- 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. AddUMotionCameraComponentto the character and configure the breathing curve.BPC_SprintComponent.uasset: Replaced by the C++UMotionSprintComponent. Move custom logic and use a correspondingGA_Character_SprintGameplay Ability.BPC_JumpComponent.uasset: Replaced by the C++UMotionJumpComponent. Move custom logic and use a correspondingGA_Character_JumpGameplay Ability.BPC_MovementSoundComponent.uasset: Replaced by the C++UMotionMovementSoundComponent. Create aSurfaceEffectsTableand a generic Gameplay Cue Blueprint. Update the Animation Notifies.FStructMovementSound: Replaced byFSurfaceEffectAssets.EMovementSoundTypes: Enum removed fromMotionEnums.h(replaced by Gameplay Tags).UMotionInputComponent: Removed entirely. Also removedBindActionByTagfromUMotionAbilitySystemHelper. Use the standardUEnhancedInputComponent.UMotionAbilitySystemComponent: Removed entirely. Use the standardUAbilitySystemComponentor a project subclass. Removed itsUMotionAnimInstancedependency.AMotionPlayerController: Removed entirely. Use the standardAPlayerController.AMotionGameMode/B_MotionGameMode.uasset: Removed entirely (.h,.cpp,.uasset). A specific GameMode is not necessary.UMotionCurveManager: Removed entirely (.hand.cpp). Functionality integrated intoUMotionCameraComponent.AMotionCharacter: Removed entirely (.hand.cpp). Functionality moved to components or documentation examples.UMotionCharacterMovementComponent: Removed entirely. Use the standardUCharacterMovementComponent. Project GAS Attributes, Effects, and Abilities control speed and state.UMotionInputConfig: Removed entirely (.hand.cpp). Users manage input actions directly.UMotionCrouchComponent's internal state management, direct input handling (SetCrouch,DoCrouch,DoUncrouch), and direct speed modification.- Removed hard
TObjectPtrreferences toUInputActionandUMetaSoundSourcein config/structs (replaced withTSoftObjectPtr).
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
FSurfaceEffectAssetsDataTable and a Gameplay Cue Blueprint forUMotionMovementSoundComponent. - The example Blueprint
B_Motion2Characterinherits directly fromACharacterand demonstrates C++ components, GAS integration, and input binding.