UCurveVector
#include "Curves/CurveVector.h" Description
A curve asset with three float channels (X, Y, Z) that returns an FVector when evaluated. Useful for animating positions, offsets, scale, or any three-channel value over time.
Signature
class UCurveVector : public UCurveBase Caveats & Gotchas
- • Each of the three channels is an independent FRichCurve — they can have different keyframe layouts and tangent types.
- • Sample with GetVectorValue(Time) to get all three channels at once.
- • For struct-embedded curves without an asset, use FRuntimeVectorCurve.
Example
Animate an offset over time C++
UPROPERTY(EditDefaultsOnly)
UCurveVector* BobCurve;
void Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
ElapsedTime += DeltaTime;
if (BobCurve)
{
FVector Offset = BobCurve->GetVectorValue(ElapsedTime);
SetActorRelativeLocation(BaseLocation + Offset);
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?