struct

AnimatorComponent

Module
Animation
Header
#include "Animation/Components/AnimatorComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
boolplayingDefault true.
boolloopDefault true.
floatspeedDefault 1.0f.
floatcurrentTimeDefault 0.0f.
int32_tcurrentAnimationCurrent animation index (-1 = none) Default 0.
Ref<Skeleton>skeletonShared skeleton (owned by ModelResource, multiple entities can share)
std::vector<Ref<AnimationClip>>clipsAvailable animation clips (owned by ModelResource)
std::vector<Mat4>boneMatricesComputed bone matrices for GPU upload (final skinning matrices) Updated by AnimationSystem each frame
ESkinningMethodskinningMethodRides every skinned draw this animator submits; the renderer converts the palette on upload, so the CPU pose stays matrices either way. Default ESkinningMethod::Linear.
EntityIDleaderPoseEntityLeader-pose (UE's master pose): when set, this animator does not evaluate at all — after the frame's evaluation it COPIES the leader entity's final palette/pose. Modular characters (head/torso/legs sharing one skeleton) pay one evaluation instead of one per part. Skeleton bone counts must match; a mismatch skips the copy with a one-time warning. Default INVALID_ENTITY.
boolleaderPoseWarnedDefault false.
std::vector<Mat4>globalPoseThe final GLOBAL (mesh-space) pose behind boneMatrices — what socket queries and gameplay bone lookups read. Reconstructing it from the palette would need inverse bind matrices, which procedurally-built skeletons don't always carry.
std::stringmodelPathModel path for serialization
Ref<AnimationController>controllerOptional state machine controller for advanced transitions When set, overrides basic currentAnimation/currentTime playback
std::stringcontrollerPathAuthored .animgraph controller asset, resolved once by AnimationSystem into controller above so every hydration path picks it up.
boolcontrollerResolveAttemptedDefault false.
FAnimGraphInstancegraphInstancePer-entity runtime state for the controller's pose graph (clip clocks, bool-blend state, cached-pose slots) — never shared across entities even when the controller asset is.
std::unordered_map<std::string, std::shared_ptr<const FAnimGraph>>linkedLayersGraphs linked into named layers (UE linked anim layers): a Linked Anim Layer node in the controller's graph runs the one linked under its name, so carrying a torch, an injury or a two-handed object swaps a whole locomotion sub-graph instead of bloating one graph with bool switches.
floatprevTimeTicksAnimation events. Previous time in ticks (for event detection between frames) Default 0.0f.
int32_tprevNotifyClipIndexThe clip prevTimeTicks was measured on. When the playing clip's identity changes (state switch, blend-space representative change), the interval [prevTimeTicks, now] spans two unrelated timelines — firing it would replay the new clip's whole notify backlog, and a shorter new clip reads as a loop wrap. Event detection re-anchors instead. Default -1.
std::unordered_map<std::string, AnimEventCallback>eventCallbacksEvent callbacks: name -> callback.
AnimEventCallbackglobalEventCallbackGlobal callback for all events (useful for scripting dispatch)
floatlodAccumDtUpdate-rate LOD — banked dt + frame counter while the AnimationSystem skips this animator (far from the LOD focus). Default 0.0f.
uint32_tlodFrameCounterDefault 0.
uint32_tanimLodWhich per-LOD required-bone set the skeleton should apply this frame (Skeleton::SetLodBonesToRemove). AnimationSystem writes it from the same distance/significance tier that picks the update rate — a rig far enough to sample every 16th frame is also far enough to stop animating its fingers. A skeleton with no authored masks ignores it entirely. Default 0.
uint64_tlastRenderedSerialThe AnimationSystem update serial at which the scene last drew this animator inside the camera frustum (AnimationSystem::NoteRendered), and how many frames in a row the budget has deferred it — the input to a.OffscreenInterval and the starvation guard of a.BudgetMs. Default 0.
uint32_tbudgetDeferredFramesDefault 0.
boolrootMotionEnabledRoot motion. Deltas are FRAME-TO-FRAME (UE5 semantics), so delta / dt is a velocity. Loop wraps and clip changes are compensated in ExtractRootMotion; the prev* fields are its running state, not an output. Default false.
boolrootMotionIncludeVerticalKeep the authored vertical in the DELTA (vault/jump/mantle clips move the capsule up) instead of leaving it in the pose and zeroing the delta's Y. Off by default: idle/walk clips bob the root, and without this flag that bob stays cosmetic in the pose. Default false.
boolrootMotionFromMontagesOnlyUE's RootMotionFromMontagesOnly: the delta comes from the montage playhead alone (weight-scaled), so locomotion blends can never feed the capsule — montage-driven attacks/dodges still do. Slot montages are not sourced, only the main montage player. Default false.
Vec3rootMotionDeltaPosition
QuatrootMotionDeltaRotationDefault Quat::Identity().
boolrootMotionHasPrevDefault false.
Vec3rootMotionPrevPosition
QuatrootMotionPrevRotationDefault Quat::Identity().
std::unordered_map<std::string, float>animCurvesNamed curve values evaluated THIS frame from the playing clips — blend-space weighted like the pose, montage-lerped like the pose. Consumers (material param routing, gameplay) read GetCurveValue.
std::vector<FAnimPoseClipContribution>poseClipContributionsWhat composed THIS frame's pose, with the same weights and per-clip (phase-matched) times the pose blend used. Base entries first, montage overlays after, in application order. Empty when the animator was not evaluated this frame.
std::vector<AnimationLayer>layersAnimation layers (additive blending).
MontagePlayermontageMontage — one-shot sectioned clip blended over the base pose.
std::shared_ptr<Montage>ownedMontageMontagePlayer keeps a raw Montage* it does not own. A transient driver (behaviour-tree task, gameplay ability) hands its data over through PlayOwnedMontage so the description outlives the driver rather than the player pointing into freed storage when the driver goes away.
std::unordered_map<std::string, FMontageSlot>montageSlots
std::vector<std::string>montageAssetsMontage ASSETS (.montage) this animator can play by name. Authored on the component so a designer wires the attack montages onto a character without a line of C++; FMontageDocument::ResolveForAnimator loads each one once, after the model's clips are in, because a montage names its sections' clips by name and cannot be built before they exist.
std::unordered_map<std::string, std::shared_ptr<Montage>>montageAssetInstancesBuilt descriptions, keyed by the montage's own name — its stable identity, which is also what replication hashes into a montage id.
boolmontageAssetsResolvedDefault false.
FInertializertransitionInertializerState-machine transition inertialization. A controller transition captures the outgoing pose here and decays the per-bone offset to zero over the transition window, so state changes are pop-free (C0/C1 continuous) and can be interrupted mid-blend by a higher priority transition. lastPose/prevPose are the on-screen pose from the previous two frames — the inertializer's source + source velocity.
std::vector<Mat4>lastPose
std::vector<Mat4>prevPose
std::stringtransitionBlendProfileNameA transition's blend profile resolved against THIS entity's skeleton (per-bone blend windows). Cached by name because a locomotion graph fires the same handful of transitions over and over, and never on the shared controller asset because animation evaluates on job workers.
FBlendProfileResolvedtransitionBlendProfile
std::vector<float>transitionBoneBlendTimes
std::unordered_map<std::string, FMotionWarpTarget>motionWarpTargetsMotion warping — gameplay-set targets keyed by name, matched against a clip's authored warp windows. During a window the root-motion delta is redistributed so the accumulated motion lands the character exactly on the target's world transform at the window's end.
boolwarpWindowActiveWarp runtime state, captured on window entry and streamed each frame. Default false.
int32_twarpActiveClipIndexDefault -1.
std::stringwarpActiveWindowName
boolwarpHasTargetRotationDefault false.
Vec3warpLocalTargetPos
QuatwarpLocalTargetRotDefault Quat::Identity().
Vec3warpClipTotal
QuatwarpClipRotTotalDefault Quat::Identity().
Vec3warpClipConsumed
QuatwarpClipRotConsumedDefault Quat::Identity().
Vec3warpEmittedTransl
QuatwarpEmittedRotDefault Quat::Identity().

Public functions

ReturnsNameDescription
floatGetCurveValue
const Montage*FindMontageAsset
boolPlayMontageAssetPlay a resolved montage asset by name.
voidPlayOwnedMontage
voidPlayMontageOnSlot
voidPlayMontageRoutes by the montage's own authored slotName, so the asset decides where it plays instead of every call site restating (or contradicting) it.
voidStopMontageSlot
voidSetMontageSlotBoneMask
MontagePlayer*GetMontageSlot
voidLinkAnimLayerA null graph unlinks; the layer node then passes its input through.
voidUnlinkAnimLayer
voidSetMotionWarpTarget
voidSetMotionWarpTarget
voidRemoveMotionWarpTarget
voidClearMotionWarpTargets

Function details

GetCurveValue

C++
float GetCurveValue(const std::string& curveName, float fallback = 0.0f) const

FindMontageAsset

C++
const Montage* FindMontageAsset(const std::string& montageName) const

PlayMontageAsset

C++
bool PlayMontageAsset(const std::string& montageName, const std::string& startSection = "")

Play a resolved montage asset by name. Routes through PlayMontage, so the asset's own slotName decides where it lands.

PlayOwnedMontage

C++
void PlayOwnedMontage(std::shared_ptr<Montage> montageData, const std::string& startSection = "")

PlayMontageOnSlot

C++
void PlayMontageOnSlot(const std::string& slot, const Montage* montageData, const std::string& startSection = "")

PlayMontage

C++
void PlayMontage(const Montage* montageData, const std::string& startSection = "")

Routes by the montage's own authored slotName, so the asset decides where it plays instead of every call site restating (or contradicting) it. PlayMontageOnSlot stays as the explicit override.

StopMontageSlot

C++
void StopMontageSlot(const std::string& slot, float blendOut = -1.0f)

SetMontageSlotBoneMask

C++
void SetMontageSlotBoneMask(const std::string& slot, const std::unordered_set<uint32_t>& mask)

GetMontageSlot

C++
MontagePlayer* GetMontageSlot(const std::string& slot)

LinkAnimLayer

C++
void LinkAnimLayer(const std::string& layer, std::shared_ptr<const FAnimGraph> graph)

A null graph unlinks; the layer node then passes its input through.

UnlinkAnimLayer

C++
void UnlinkAnimLayer(const std::string& layer)

SetMotionWarpTarget

C++
void SetMotionWarpTarget(const std::string& name, const Vec3& position, const Quat& rotation)

SetMotionWarpTarget

C++
void SetMotionWarpTarget(const std::string& name, const Vec3& position)

RemoveMotionWarpTarget

C++
void RemoveMotionWarpTarget(const std::string& name)

ClearMotionWarpTargets

C++
void ClearMotionWarpTargets()
Generated from Animation/Components/AnimatorComponent.h via animation.json · Oct 26, 2026Version 1.0.0