RealDocs

UKismetMathLibrary::VInterpTo_Constant

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Moves a vector toward a target at a constant rate (world units per second) rather than using exponential decay. Clamps to the target once it would overshoot.

Caveats & Gotchas

  • Unlike VInterpTo, this function moves at a fixed speed regardless of distance. A far-away target takes longer to reach, and a nearby target snaps as soon as the remaining distance is less than InterpSpeed * DeltaTime — useful when predictable timing matters more than organic feel.
  • InterpSpeed is in units per second, not a unitless rate like VInterpTo. Setting it too low relative to expected distances will make the object feel stuck; setting it too high produces an immediate snap.

Signature

static UE_INL_API FVector VInterpTo_Constant(FVector Current, FVector Target, float DeltaTime, float InterpSpeed);

Parameters

Name Type Description Default
Current FVector The current value.
Target FVector The target value.
DeltaTime float Time elapsed since the last call, in seconds.
InterpSpeed float World units per second to move toward Target.

Return Type

FVector

Example

Move UI element at a fixed speed C++
// Moves widget position 300 units/s toward the anchor
CurrentWidgetPos = UKismetMathLibrary::VInterpTo_Constant(
    CurrentWidgetPos, AnchorPos, DeltaTime, 300.f);
WidgetTransform.Translation = FVector2D(CurrentWidgetPos.X, CurrentWidgetPos.Y);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.