Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UBlueprintSpringMathLibrary
Description
Estimates an approximate stopping time (how long until the velocity goes below the VelocityThreshold) from a smoothing time for a character using a simple damped spring. Assumes the initial acceleration is zero.
| Name | SpringCharacterStoppingTime |
| 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="Stopping Time"))
static float SpringCharacterStoppingTime
(
const float InitialVelocity,
const float SmoothingTime,
const float VelocityThreshold
)
An estimation of the time taken to come to a stop
Parameters
| Name | Remarks |
|---|---|
| InitialVelocity | The velocity of the character at the start of the stop |
| SmoothingTime | The time over which to smooth velocity. It takes roughly the smoothing time in order for the character to reach the target velocity. |
| VelocityThreshold | The velocity threshold at which the character is considered to be stopped in cm/s |