UBlendSpace::UpdateBlendSamples
#include "Animation/BlendSpace.h"
Access: public
Specifiers: const
Description
Advances a cached set of blend samples for one tick, given a new blend space position and delta time. Used internally by GetAnimationPose.
Caveats & Gotchas
- • Does not perform filtering itself — call FilterInput on the raw input before passing it in if smoothing is desired.
- • InOutSampleDataCache must persist across calls (e.g. stored on your anim node/instance); passing a fresh empty array every tick defeats target weight interpolation.
Signature
ENGINE_API bool UpdateBlendSamples(const FVector& InBlendSpacePosition, float InDeltaTime, TArray<FBlendSampleData>& InOutSampleDataCache, int32& InOutCachedTriangulationIndex) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InBlendSpacePosition | const FVector& | The current position parameter of the blend space. | — |
| InDeltaTime | float | The tick time for this update. | — |
| InOutSampleDataCache | TArray<FBlendSampleData>& | Sample data cache; previous frame's samples are reused when target weight interpolation is enabled. | — |
| InOutCachedTriangulationIndex | int32& | Cached triangulation index to warm-start the next sample lookup. | — |
Return Type
bool Example
Manual per-tick update C++
// Members persisted on your custom anim node:
// TArray<FBlendSampleData> SampleDataCache;
// int32 CachedTriangulationIndex = INDEX_NONE;
const bool bValid = MyBlendSpace->UpdateBlendSamples(BlendPosition, DeltaTime, SampleDataCache, CachedTriangulationIndex); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?