GS_Motion

Track-based animation and tween system — abstract base classes for motions, tracks, composites, assets, and proxies with a domain extension pattern.

GS_Motion is the framework’s central track-based animation system. It defines abstract base classes that domain gems extend with concrete track types — GS_UI extends it with 8 UI animation tracks (.uiam assets), and GS_Juice extends it with 2 feedback tracks (.feedbackmotion assets). The system handles playback timing, per-track easing, proxy-based entity targeting, and deep-copy runtime instancing from data assets.

For usage guides and setup examples, see The Basics: GS_Core.

 

Contents


Architecture

GS_MotionTrack (abstract base)
    ├── UiMotionTrack (GS_UI domain base)
    │       ├── UiPositionTrack
    │       ├── UiScaleTrack
    │       ├── UiRotationTrack
    │       ├── UiElementAlphaTrack
    │       ├── UiImageAlphaTrack
    │       ├── UiImageColorTrack
    │       ├── UiTextColorTrack
    │       └── UiTextSizeTrack
    └── FeedbackMotionTrack (GS_Juice domain base)
            ├── FeedbackTransformTrack
            └── FeedbackMaterialTrack

GS_MotionAsset (abstract base)
    ├── UiAnimationMotionAsset (.uiam)
    └── FeedbackMotionAsset (.feedbackmotion)

GS_MotionComposite (runtime instance)
    └── Created by asset's CreateRuntimeComposite()

Core Classes

ClassDescriptionPage
GS_MotionTrackAbstract base for all animation tracks — fields, lifecycle, virtual methods, extension guide.MotionTrack
GS_MotionPlayback engine — ticks tracks, computes per-track progress windows, applies easing, manages lifecycle.Motion Engine
GS_MotionCompositeRuntime deep-copy instance with proxy entity overrides — created from GS_MotionAsset.MotionComposite
GS_MotionAssetAbstract base for motion data assets — holds track definitions and creates runtime composites.MotionAsset
GS_MotionProxySerialized struct for track-to-entity redirection — allows designers to target named tracks at different entities.MotionProxy

Domain Extensions

GS_Motion is designed to be extended by domain gems. Each domain creates its own track hierarchy, asset type, and file extension.

DomainGemBase TrackConcrete TracksAsset Extension
UI AnimationGS_UIUiMotionTrackPosition, Scale, Rotation, ElementAlpha, ImageAlpha, ImageColor, TextColor, TextSize (8).uiam
FeedbackGS_JuiceFeedbackMotionTrackFeedbackTransformTrack, FeedbackMaterialTrack (2).feedbackmotion

Extension Pattern

To create a new motion domain:

  1. Create a domain base trackclass MyTrack : public GS_Core::GS_MotionTrack
  2. Create concrete tracks extending the domain base — each overrides Update(float easedProgress) and GetTypeName()
  3. Create a domain assetclass MyAsset : public GS_Core::GS_MotionAsset with vector<MyTrack*> m_tracks
  4. Create an instance wrapper struct (not a component) — holds Asset<MyAsset> + vector<GS_MotionProxy>, manages Initialize / Unload / Play / Stop
  5. Embed the wrapper — components embed the instance wrapper struct as a serialized field

Critical: All track vectors must use raw pointers: vector<MyTrack*>. Never use unique_ptr — O3DE SerializeContext requires raw pointers for polymorphic enumeration in the asset editor.


See Also

For conceptual overviews and usage guides:

For class references:

For domain extensions:


Get GS_Core

GS_Core — Explore this gem on the product page and add it to your project.