ue-animation-system

Use this skill when working with Unreal Engine animation: AnimInstance, montage playback, blend space, state machine, anim notify, IK, AnimGraph, skeletal mesh, or linked anim graphs. See references/anim-notify-reference.md for notify patterns and references/locomotion-setup.md for locomotion setup.

By quodsoler · 854 installs

npx skills add quodsoler/unreal-engine-skills --skill ue-animation-system

Source repository · Upstream listing

UE Animation System You are an expert in Unreal Engine's animation system. Context Check Read .agents/ue project context.md first. Note which plugins are enabled (Control Rig, Motion Matching, Full Body IK), whether GAS is in use, and the skeleton/character hierarchy. Information to Gather 1. What animation need? (locomotion, ability, cinematic, IK, procedural) 2. C++ only, Blueprint only, or mixed? 3. Does the character use ACharacter with an existing USkeletalMeshComponent ? 4. Is GAS active? (affects montage replication) 5. Multiplayer? (determines replication strategy) 6. Does the project use modular linked anim layers? Architecture Animation updates run in two phases. Game thread: NativeUpdateAnimation — safe to read gameplay state. Worker thread: blend tree evaluation. Write all shared state as UPROPERTY() Transient members in NativeUpdateAnimation ; read those cached values in NativeThreadSafeUpdateAnimation . AnimInstance Subclass Pattern FAnimInstanceProxy — Thread Safe Access Heavy animation logic can run on worker threads via NativeThreadSafeUpdateAnimation . Access shared data through the proxy: The engine copies data between game thread and worker thread at safe sync points. Montages Source: AnimMontage.h , AnimInstance.h Key API ( UAnimInstance ): Playing + Delegate Pattern Dynamic Slot Montage Multiplayer Replication With GAS : use UAbilitySystemComponent::PlayMontage() — GAS handles replication via FGameplayAbilityRepAnimMontage . Without GAS : replicate a montage pointer or a custom rep struct; server calls Montage Play , clients play on OnRep . Never call Montage Play independently on all net roles without sync. GAS Integration — PlayMontageAndWait Blend Spaces Blend spaces are data assets sampled in the AnimGraph. Drive them by setting UPROPERTY members on the AnimInstance that the AnimGraph reads. 1D ( UBlendSpace1D ): single axis, typically Speed (0–600). Use FInterpolationParameter with InterpolationType=SpringDamper , InterpolationTime=0.15 , DampingRatio=1.0 . 2D ( UBlendSpace ): two axes — Direction ( 180 to 180) and Speed (0–600). Cardinal direction samples at each speed tier. Aim Offset ( UAimOffsetBlendSpace ): additive blend space for Yaw/Pitch aiming, placed after the base locomotion pose in the AnimGraph. See references/locomotion setup.md for complete axis configuration and sample placement. State Machines State machines live in the AnimGraph. Bind native C++ logic to transition rules and state entry/exit without Blueprint: Query state machine at runtime: Conduit Nodes Conduits evaluate a single boolean rule and fan out to multiple destination states — replacing duplicated transition logic. Add a Conduit in the AnimGraph editor; its CanEnterTransition runs once and all outgoing transitions share the result. Use conduits when three or more states need the same entry condition (e.g., "is grounded?"). For simple A to B transitions, a direct rule is clearer. Anim Notifies Source: AnimNotify.h , AnimNotifyState.h UAnimNotify — Point in Time UAnimNotifyState — Duration (Begin/Tick/End) BranchingPoint (Synchronous) Set bIsNativeBranchingPoint = true in the constructor. Override BranchingPointNotify() instead of Notify() . Fires synchronously during Montage Advance — use for section jumps and precise timeline control. All other notifies are queued (fire after tick completes, safe for VFX/SFX). Named Notify Delegate See references/anim notify reference.md for built in notify catalog and more custom patterns. IK and Procedural Foot IK with Line Traces (NativeUpdateAnimation — game thread) Feed results into a Control Rig asset (UE5 recommended) or a Two Bone IK skeletal control node in the AnimGraph. Skeletal control nodes (AnimGraph): Node Purpose Two Bone IK Two joint IK (arm, leg) — effector + joint target FABRIK Multi bone chain IK — tip bone + effector Look At Single bone tracks target location with clamp Copy Bone Copies transform components between bones Spline IK Bones follow a spline curve (spine, tail) Layered Blend Per Bone (Upper/Lower Split) In the AnimGraph: 1. Connect state machine output to Base Pose . 2. Connect UpperBody slot output to Blend Poses 0 . 3. Layer Setup: Bone= spine 01 , Depth=0, MeshPoseBlendFactor=1.0. Attack montages use the UpperBody slot; locomotion plays uninterrupted below. Aim Offset Place an Aim Offset node after the base pose in the AnimGraph, feeding AimYaw and AimPitch . Linked Anim Graphs and Layers Source: AnimNode LinkedAnimGraph.h , AnimNode LinkedAnimLayer.h Linked Anim Layer (Recommended) 1. Create a UAnimLayerInterface Blueprint with layer function signatures. 2. Main AnimInstance has Linked Anim Layer nodes referencing the interface. 3. Separate AnimInstance subclasses implement the interface per mode. 4. Swap at runtime: Linked Anim Graph (by Tag) Notify Propagation Root Motion For networked root motion, set the movement component's smoothing mode to ENetworkSmoothingMode::Exponential and enable bAllowPhysicsRotationDuringAnimRootMotion if rotation comes from animation. The server runs root motion authoritatively; clients predict and correct via FRootMotionMovementParams . Common Mistakes Anti Pattern Fix Reading gameplay state in NativeThreadSafeUpdateAnimation Cache values as UPROPERTY Transient in NativeUpdateAnimation (game thread) Polling Montage IsActive in a loop Bind FOnMontageEnded delegate before calling Montage Play Two montages sharing the same slot group Use distinct slot names ( UpperBody , LowerBody ) or bStopAllMontages=false Skipping Super::NativeInitializeAnimation() Always call super — it initializes the proxy and skeleton Calling non thread safe UObject methods in thread safe update Only read primitive UPROPERTY copies; never call GetOwningActor() from worker thread Build.cs Related Skills ue gameplay abilities — PlayMontageAndWait task, GAS montage replication. ue actor component architecture — SkeletalMeshComponent setup, Character hierarchy, component tick ordering. ue cpp foundations — delegate binding, UPROPERTY specifiers, TWeakObjectPtr . Reference Files references/anim notify reference.md — built in notify catalog and custom notify implementation patterns. references/locomotion setup.md — complete locomotion blend space and state machine configuration guide.