UAnimInstance::GetAnimationCurves
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_API
Description
Returns a read-only map of all evaluated animation curve values for the specified curve type. Keys are curve names and values are the blended float results from the current frame's animation evaluation.
Caveats & Gotchas
- • The returned map reflects the state after the most recent animation evaluation. If called before animation has ticked this frame (e.g., during BeginPlay), the map may be empty or contain stale values from the previous frame.
- • Curves driven by montages, sequences, and pose assets are all merged into this single map. If two sources drive the same curve name, the result is the blended output — there is no way to retrieve per-source curve contributions from this function.
Signature
ENGINE_API const TMap<FName, float>& GetAnimationCurves(EAnimCurveType CurveType) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| CurveType | EAnimCurveType | The type of curves to retrieve — typically AttributeCurve for gameplay-driven curves or MorphTargetCurve for blend shape weights. | — |
Return Type
const TMap<FName, float>& Example
Read all attribute curves for gameplay logic C++
void UMyAnimInstance::ProcessAnimCurves()
{
const TMap<FName, float>& Curves = GetAnimationCurves(EAnimCurveType::AttributeCurve);
if (const float* AimPitch = Curves.Find(FName("AimPitch")))
{
CachedAimPitch = *AimPitch;
}
} See Also
Tags
Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?