Introduction
The animation layer refer to independent animation blueprint that implement a specific animation layer interface (AnimLayerInterface). In traditional Unreal development, these were typically linked directly to the main animation blueprint.
GMS represents a data-driven movement system that further deconstructs the concept of animation layer into:
- Anim Layer Settings: Static data designed to configure the animation resources, logical parameters, and other elements pertinent to an animation layer instance.
- Anim Layer Instances: These are independent animation blueprints that implement the predefined animation layer interfaces (ALI_Locomotion, ALI_Overlay, etc.) within GMS, essentially forming the logic of the animation.
You can select different animation layer settings within the movement set configuration. When you switch between various movement sets, GMS automatically links the corresponding anim layer instance associated with the "anim layer settings" to the main animation blueprint, a design pattern known as "implementation following configuration."
The relationship between animation layer settings and the animation layers is defined by the AnimGraphSetting.
Anim Graph Setting
The Animation Graph Settings is a data asset of the type GMS_AnimGraphSetting, you can specify different graph settings on the movement system component (GMS_CharacterMovementSystem) through AnimGraphSetting field.
The following image illustrates the default animation graph settings provided for the Mannequin.
What can it do?
Thanks to the mapping between "animation layer settings" and "animation layer instances," when different animation layer settings are applied, different animation instances are automatically linked for dynamic switching of underlying logic. With this flexible architecture, you can easily add, modify, or replace the corresponding functionalities.
Note
If you have custom anim layer settings, they will automatically appear in the movement set configuration, but you need to specify the mapping relationship between them to make them work properly.
Stride Warping
Stride Warping adjusts animation stride to the character's actual movement speed, helping foot placement stay consistent with movement across the ground.
Bone References
Configure the references for each target skeleton in its corresponding GMS_AnimGraphSetting asset:
StrideWarpingBoneReference: setPelvisBoneandIKFootRootBone.StrideWarpingFootDefinitions: add one entry per leg and set itsIKFootBone,FKFootBone, andThighBone. A biped usually has one entry for each leg.
The default States animation layer reads and passes these references when the graph setting is applied. Custom animation layers or node graphs must pass the same data to the Stride Warping node's ExternalBoneReference and ExternalFootDefinitions inputs.
AnimGraph Node
Add the Generic Stride Warping node (AnimGraph category: GMS|Animation Warping) to the locomotion AnimGraph and provide the bone references above. The node's Mode selects the source of stride data:
- Graph: reads stride direction and root-motion speed from animation root-motion data, then computes scale from actual locomotion speed. This mode requires root-motion data. By default, the node is disabled when root motion is missing, so it will not warp without that data.
MinRootMotionSpeedThresholddefaults to10and can be tuned for the project. - Manual: uses explicit
StrideDirectionandStrideScaleinputs.
Controls in the Default Locomotion Layer
The default locomotion layer settings provide Stride Warping enable and blend controls for Start and Pivot animations. Cycle animations use bEnableStrideWarping to control whether warping is enabled. Disable Stride Warping for non-humanoid skeletons. Check that every referenced bone exists in the target Skeleton and verify that the node inputs are connected in the AnimGraph.