Navigation
API > API/Runtime > API/Runtime/AnimGraphRuntime > API/Runtime/AnimGraphRuntime/UKismetAnimationLibrary
Description
Returns degree of the angle between Velocity and Rotation forward vector The range of return will be from [-180, 180]. Useful for feeding directional blendspaces.
| Name | CalculateDirection |
| Type | function |
| Header File | /Engine/Source/Runtime/AnimGraphRuntime/Public/KismetAnimationLibrary.h |
| Include Path | #include "KismetAnimationLibrary.h" |
| Source | /Engine/Source/Runtime/AnimGraphRuntime/Private/KismetAnimationLibrary.cpp |
UFUNCTION (BlueprintPure, Category="Animation|Utilities")
static float CalculateDirection
(
const FVector & Velocity,
const FRotator & BaseRotation
)
Parameters
| Name | Remarks |
|---|---|
| Velocity | The velocity to use as direction relative to BaseRotation |
| BaseRotation | The base rotation, e.g. of a pawn |