UKismetMathLibrary::TLerp
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Linearly interpolates the location, rotation, and scale of two transforms based on Alpha, returning A when Alpha is 0 and B when Alpha is 1. This is the Blueprint node behind the transform version of Lerp.
Caveats & Gotchas
- • The BlueprintPure node is labelled "Lerp (Transform)" in the graph editor, not TLerp — search for that if you can't find it.
- • Alpha is not clamped, so values outside 0-1 extrapolate past A or B rather than being clamped to the endpoints.
- • InterpMode defaults to quaternion interpolation for rotation, which avoids gimbal issues that Euler interpolation can produce on large rotations.
Signature
static FTransform TLerp(const FTransform& A, const FTransform& B, float Alpha, TEnumAsByte<ELerpInterpolationMode::Type> InterpMode = ELerpInterpolationMode::QuatInterp) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FTransform& | The transform returned when Alpha is 0. | — |
| B | const FTransform& | The transform returned when Alpha is 1. | — |
| Alpha | float | Interpolation factor between A and B. | — |
| InterpMode | TEnumAsByte<ELerpInterpolationMode::Type> | How rotation is interpolated — quaternion, Euler, or dual-quaternion. | ELerpInterpolationMode::QuatInterp |
Return Type
FTransform Example
Blend between two poses C++
FTransform Blended = UKismetMathLibrary::TLerp(StartPose, EndPose, 0.5f); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?