Navigation
API > API/Runtime > API/Runtime/AnimGraphRuntime > API/Runtime/AnimGraphRuntime/UKismetAnimationLibrary
References
| Module | AnimGraphRuntime |
| Header | /Engine/Source/Runtime/AnimGraphRuntime/Public/KismetAnimationLibrary.h |
| Include | #include "KismetAnimationLibrary.h" |
| Source | /Engine/Source/Runtime/AnimGraphRuntime/Private/KismetAnimationLibrary.cpp |
static float K2_CalculateVelocityFromPositionHistory
&40;
float DeltaSeconds,
FVector Position,
FPositionHistory & History,
int32 NumberOfSamples,
float VelocityMin,
float VelocityMax
&41;
Remarks
This function calculates the velocity of a position changing over time. You need to hook up a valid PositionHistory variable to this for storage.
Parameters
| Name | Description |
|---|---|
| DeltaSeconds | The time passed in seconds |
| Position | The position to track over time. |
| History | The history to use for storage. |
| NumberOfSamples | The number of samples to use for the history. The higher the number of samples - the smoother the velocity changes. |
| VelocityMin | The minimum velocity to use for normalization (if both min and max are set to 0, normalization is turned off) |
| VelocityMax | The maximum velocity to use for normalization (if both min and max are set to 0, normalization is turned off) |