> For the complete documentation index, see [llms.txt](https://docs.kia.dev/motion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kia.dev/motion/tutorials/architecture-diagram.md).

# Architecture Diagram

The diagram below provides a high-level overview of the Motion's architecture.

{% @mermaid/diagram content="graph TD
InputLayer --> CharacterLayer
CharacterLayer --> Logic & State
Logic & State --> Output & Effects" %}

{% @mermaid/diagram content="graph TD
subgraph "Input Layer (Enhanced Input)"
direction LR
InputActions\["Input Actions (IA\_Move, etc.)"] --> InputMappingContext\["Input Mapping Context (IMC\_Motion\_KBM/Controller)"]
InputMappingContext --> MotionInputComponent\[C++: MotionInputComponent]
end

```
subgraph "Character Layer"
    direction TB
    MotionCharacter["BP: B_MotionCharacter / C++: MotionCharacter"]
    MotionCharacter -- Contains --> MotionCMC[C++: MotionCharacterMovementComponent]
    MotionCharacter -- Contains --> MotionASC[C++: MotionAbilitySystemComponent]
    MotionCharacter -- Contains --> MotionCam[C++: MotionCameraComponent]
    MotionCharacter -- Contains --> MotionAnim[C++: MotionAnimInstance]
    MotionCharacter -- Contains --> BPComponents["BP: Movement Components (BPC_Walk, BPC_Sprint, etc.)"]
    MotionCharacter -- Contains --> SoundComponent[BP: BPC_MovementSoundComponent]
end

subgraph "Logic & State"
    direction LR
    MotionInputComponent -- Sends Input --> BPComponents
    BPComponents -- Trigger Abilities --> MotionASC
    MotionASC -- Applies --> GameplayEffects["Content: Gameplay Effects (GE_IsSprinting)"]
    GameplayEffects -- Modifies State --> MotionCMC
    GameplayEffects -- Modifies State --> MotionAnim
    MotionCMC -- Uses --> MovementCurves["Content: Curves (Curve_WalkAcceleration)"]
end

subgraph "Output & Effects"
    direction TB
    MotionAnim -- Drives --> SkeletalMesh[Character Mesh]
    MotionCam -- Controls --> PlayerView[Player Camera View]
    MotionCam -- Uses --> CameraCurves["Content: Curves (Curve_SprintShake)"]
    SoundComponent -- Plays --> Sounds["Content: Sounds (DT_MovementSounds)"]
    MotionAnim -- Triggers --> SoundComponent
end

subgraph "Game Framework"
    direction LR
    GameMode["BP: B_MotionGameMode / C++: MotionGameMode"] -- Spawns --> MotionCharacter
    PlayerController[C++: MotionPlayerController] -- Possesses --> MotionCharacter
end

style MotionCharacter fill:#lightblue,stroke:#333,stroke-width:2px
style BPComponents fill:#lightgreen,stroke:#333,stroke-width:1px
style GameplayEffects fill:#lightgreen,stroke:#333,stroke-width:1px
style MovementCurves fill:#lightgreen,stroke:#333,stroke-width:1px
style CameraCurves fill:#lightgreen,stroke:#333,stroke-width:1px
style Sounds fill:#lightgreen,stroke:#333,stroke-width:1px
style MotionInputComponent fill:#eee,stroke:#333,stroke-width:1px
style MotionCMC fill:#eee,stroke:#333,stroke-width:1px
style MotionASC fill:#eee,stroke:#333,stroke-width:1px
style MotionCam fill:#eee,stroke:#333,stroke-width:1px
style MotionAnim fill:#eee,stroke:#333,stroke-width:1px" %}
```
