Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBlueprintSpringMathLibrary
Description
Interpolates the angle InOutAngle towards TargetAngle using a critically damped spring via an intermediate state - producing a more S-shaped curve. The velocity of InOutAngle is stored in InOutAngularVelocity in deg/s.
| Name | CriticalDoubleSpringDampAngle |
| 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="TargetAngle"))
static void CriticalDoubleSpringDampAngle
(
float & InOutAngle,
float & InOutAngularVelocity,
float & InOutIntermediateAngle,
float & InOutIntermediateAngularVelocity,
const float & TargetAngle,
float DeltaTime,
float SmoothingTime
)
Parameters
| Name | Remarks |
|---|---|
| InOutAngle | The value to be damped in degrees |
| InOutAngularVelocity | The speed of the value to be damped in deg/s |
| InOutIntermediateAngle | The intermediate state of the double spring |
| InOutIntermediateAngularVelocity | The intermediate velocity of the double spring |
| TargetAngle | The goal to damp towards in degrees |
| SmoothingTime | The smoothing time to use for the spring. Longer times lead to more damped behaviour. A time of 0 will snap InOutAngle to TargetAngle |
| DeltaTime | Timestep in seconds |