Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBlueprintSpringMathLibrary
Description
Interpolates the angle InOutAngle towards TargetAngle with the motion of a critically damped spring. The velocity of InOutAngle is stored in InOutAngularVelocity in deg/s.
| Name | CriticalSpringDampAngle |
| 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|Experimental"))
static void CriticalSpringDampAngle
(
float & InOutAngle,
float & InOutAngularVelocity,
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 |
| 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 TargetX |
| DeltaTime | Timestep in seconds |