UKismetMathLibrary::FInterpEaseInOut
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Interpolates between A and B using a symmetric ease-in/ease-out curve controlled by Exponent. An Exponent of 1.0 is linear; 2.0 is quadratic.
Caveats & Gotchas
- • The ease curve is symmetric: the same exponent governs both the ease-in and ease-out halves. For asymmetric easing (fast-in, slow-out) use FInterpEaseIn/FInterpEaseOut instead.
- • Alpha is not internally clamped — passing values outside [0, 1] will extrapolate beyond A or B. Clamp Alpha before calling if the input is not already bounded.
Signature
static ENGINE_API double FInterpEaseInOut(double A, double B, double Alpha, double Exponent); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | double | Start value. | — |
| B | double | End value. | — |
| Alpha | double | Interpolation factor in [0, 1]. | — |
| Exponent | double | Controls the sharpness of the curve. 1.0 is linear; higher values produce a more pronounced ease. | — |
Return Type
double Example
Smoothly animate a UI panel sliding in C++
float ElapsedTime = 0.3f;
float Duration = 0.5f;
double Alpha = FMath::Clamp((double)ElapsedTime / Duration, 0.0, 1.0);
double PanelX = UKismetMathLibrary::FInterpEaseInOut(0.0, 800.0, Alpha, 2.0); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?