Motion Documentation

website·Indexed 31 days ago

https://docs.motionco.re

A component-based first-person character controller for Unreal Engine. Motion integrates with the Gameplay Ability System (GAS) for movement state and replication, providing specialized components for sprinting, crouching, jumping, and walking, as well as native first-person item APIs and animation instance management.

Tokens
52.5K
Snippets
86
Records
372
Agent score
52%

What's inside Motion

  1. Overview of Motion first-person item architecture

    Adding a native first-person item involves the interaction of several core components:

    • MotionNativeFirstPersonItemConfig: The primary data asset. It manages the presentation pair, automatic held pose sets, presentation actions, solve tuning, transforms, render tuning, and optional linked layers or custom graphs.
    • MotionHeldItemComponent: Manages runtime presentation, validates the config before application, and provides the action request/delegate bridge.
    • MotionAnimInstance: Exposes the current item and action state to the Animation Graph.
    • Motion First Person Item Upper Body Overlay: Handles the basic held pose, presentation action composition, pitch solve, hand IK, and automatic held pose transitions.
    • MotionCameraComponent: Manages native first-person render tuning, Stable camera clearance, and bounded upper-body/item presentation correction (while maintaining the FirstPersonLowerBody transform).
  2. Overview of UMotionHeldItemComponent

    The UMotionHeldItemComponent manages the native Motion held-item presentation at runtime. It handles the replication of active item configurations, applies usable configurations locally, and controls first-person and world item components. It is responsible for updating the Motion.State.HoldingItem GameplayTag, linking animation layers, and executing finite presentation actions.
  3. Overview of MotionMovementSoundComponent

    The MotionMovementSoundComponent plays movement sounds triggered by Animation Notifiers. It features automatic surface detection via physical materials, speed-based volume and pitch modulation, and support for both 2D and 3D audio. Sounds are only played for locally controlled characters to prevent redundant audio triggers across clients.
  4. Overview of MotionCrouchingComponent

    The MotionCrouchingComponent wraps the native Unreal crouch system (Character->Crouch() and Character->UnCrouch()). It enhances the native behavior by adding GAS integration, camera height coordination via MotionCameraComponent, speed effects, and collision checks for uncrouching. It relies on UCharacterMovementComponent for capsule resizing and prediction.
  5. Overview of MotionAttributeSet

    MotionAttributeSet is the default GAS AttributeSet for Motion movement and stamina attributes. It synchronizes specific gameplay attributes with the CharacterMovementComponent (CMC) and handles replication and clamping of movement-related values.
  6. Overview of GAS integration in Motion

    Motion utilizes the Gameplay Ability System (GAS) to standardize state and attribute management. It uses GameplayTags for states (e.g., sprinting, crouching), Attributes for numeric values (e.g., walk speed, stamina), GameplayEffects for modifying attributes and tags, and the AbilitySystemComponent (ASC) for server-client replication.
  7. Overview of MotionCameraComponent

    The MotionCameraComponent controls the first-person camera. It provides procedural curves, height transitions, static offsets, view angle limits, and native first-person body presentation. It is designed to work with a character containing a standard UCapsuleComponent and a full-body skeletal mesh. The component automatically manages references to the owning character, capsule component, and player camera manager.
  8. Overview of Motion Character Controller Architecture

    Motion is a component-based first-person character controller for Unreal Engine that works with any ACharacter subclass. It decouples movement rules from presentation (camera, sound, animation) and uses a versioned profile system for defaults. Movement state is managed via GameplayEffects, GameplayTags, and replicated attributes, allowing the server to own state while clients predict responsive input.
  9. Overview of Motion 2.0 for Unreal Engine

    Motion 2.0 is a first-person character controller designed for Unreal Engine versions 5.6, 5.7, and 5.8. It provides native first-person presentation systems and utilizes the Gameplay Ability System (GAS) for movement, camera, and animation.
  10. Overview of MotionJumpComponent

    MotionJumpComponent manages jump logic for characters, including jump intent, multi-jump capabilities, coyote time, input timing, landing feedback, and server-side validation. It integrates with UCharacterMovementComponent and the Gameplay Ability System (GAS).
  11. Manage character crouching with the Crouch Component

    The Crouch Component in Motion 1.6 handles smooth transitions between crouching and uncrouching states. It includes built-in floor and ceiling detection to prevent the character capsule from expanding into geometry and allows for partial uncrouching if ceiling height is limited. Characters in a crouched state typically incur a speed penalty.
  12. Migrate from Motion 1.x to Motion 2.0

    A fresh integration is strongly recommended when moving to Motion 2.0. Do not attempt to migrate by keeping Motion 1.x classes in place, as the architecture has changed significantly, including the removal of several Motion-specific base classes.