UBlendSpace::GetClampedAndWrappedBlendInput
#include "Animation/BlendSpace.h"
Access: public
Specifiers: const
Description
Clamps each axis of a blend input to its configured range, wrapping instead of clamping for any axis marked as wrapping (e.g. a 360-degree direction axis).
Caveats & Gotchas
- • Wrapping behaviour depends on the per-axis 'wrap input' setting configured on the blend space asset, not just the numeric range.
- • Feed raw/unclamped input here before calling GetSamplesFromBlendInput, otherwise out-of-range values on a non-wrapping axis produce zero-weighted results at the edge.
Signature
ENGINE_API FVector GetClampedAndWrappedBlendInput(const FVector& BlendInput) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| BlendInput | const FVector& | Raw blend input coordinates to normalize against this blend space's axis ranges. | — |
Return Type
FVector Example
Normalize input before sampling C++
const FVector Clamped = MyBlendSpace->GetClampedAndWrappedBlendInput(FVector(Speed, Direction, 0.f));
TArray<FBlendSampleData> SampleDataList;
int32 CachedIndex = INDEX_NONE;
MyBlendSpace->GetSamplesFromBlendInput(Clamped, SampleDataList, CachedIndex, true); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?