Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBlueprintSpringMathLibrary
Description
Estimates an approximate turning time (time until the angle is within the AngleThreshold of the target) from a smoothing time for a character using a simple damped spring. Assumes the initial angular velocity is zero.
| Name | SpringCharacterTurningTime |
| 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 (BlueprintPure, Meta=(Category="Math|Spring", ReturnDisplayName="Turning Time"))
static float SpringCharacterTurningTime
(
const float TargetAngle,
const float SmoothingTime,
const float AngleThreshold
)
An estimation of the time taken to turn
Parameters
| Name | Remarks |
|---|---|
| TargetAngle | The target angle of the character in degrees |
| SmoothingTime | The time over which to smooth turning. It takes roughly the smoothing time in order for the character to reach the target angle. |
| AngleThreshold | The angle threshold from the target at which the character is considered to have turned in degrees |