Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBlueprintSpringMathLibrary
Description
Interpolates the value InOutX towards TargetX using a critically damped spring via an intermediate state - producing a more S-shaped curve. The velocity of X is stored in InOutV.
| Name | CriticalDoubleSpringDampVector2D |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/BlueprintSpringMathLibrary.h |
| Include Path | #include "Kismet/BlueprintSpringMathLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Private/BlueprintSpringMathLibrary.cpp |
UFUNCTION (BlueprintCallable, Meta=(Category="Math|Spring", AutoCreateRefTerm="TargetX"))
static void CriticalDoubleSpringDampVector2D
(
FVector2D & InOutX,
FVector2D & InOutV,
FVector2D & InOutXi,
FVector2D & InOutVi,
const FVector2D & TargetX,
float DeltaTime,
float SmoothingTime
)
Parameters
| Name | Remarks |
|---|---|
| InOutX | The value to be damped |
| InOutV | The speed of the value to be damped |
| InOutXi | The intermediate state of the double spring |
| InOutVi | The intermediate velocity of the double spring |
| TargetX | The goal to damp towards |
| SmoothingTime | The smoothing time to use for the spring. Longer times lead to more damped behaviour. A time of 0 will snap InOutX to TargetX |
| DeltaTime | Timestep in seconds |