RealDocs

UKismetMathLibrary::Vector_SlerpNormals

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

Description

Performs a spherical linear interpolation (slerp) between two normalized direction vectors, tracing the shortest arc on the unit sphere from NormalA to NormalB.

Caveats & Gotchas

  • Both inputs must be normalized (unit length). Passing non-unit vectors produces incorrect results — the function does not normalize internally. Call GetSafeNormal() on inputs before passing.
  • When NormalA and NormalB are antiparallel (dot product ≈ -1), the shortest arc is undefined; the function may return an arbitrary perpendicular vector. Add a dot-product guard if this edge case is possible.
  • Alpha is not clamped. Values outside [0, 1] extrapolate past the arc endpoints.

Signature

static UE_INL_API FVector Vector_SlerpNormals(FVector NormalA, FVector NormalB, double Alpha);

Parameters

Name Type Description Default
NormalA FVector Starting normalized direction vector.
NormalB FVector Ending normalized direction vector.
Alpha double Interpolation factor in [0, 1]. 0 returns NormalA; 1 returns NormalB.

Return Type

FVector

Example

Blend two surface normals for a procedural deformation effect C++
FVector SurfaceNormal = HitResult.ImpactNormal;
FVector UpNormal = FVector::UpVector;
float BlendAlpha = 0.6f;
FVector BlendedNormal = UKismetMathLibrary::Vector_SlerpNormals(SurfaceNormal, UpNormal, BlendAlpha);
// Use BlendedNormal to orient a decal or particle emission direction

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.