Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UKismetMathLibrary
Description
Return the Quaternion orientation corresponding to the direction in which the vector points. Similar to the FRotator version, returns a result without roll such that it preserves the up vector.
If you don't care about preserving the up vector and just want the most direct rotation, you can use the faster 'FindBetweenVectors(ForwardVector, YourVector)' or 'FindBetweenNormals(...)' if you know the vector is of unit length.
| Name | Conv_Vector4ToQuaternion |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h |
| Include Path | #include "Kismet/KismetMathLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl |
UFUNCTION (BlueprintPure,
Meta=(DisplayName="To Quaternion (Vector4)", ScriptMethod="Quaternion", Keywords="rotation rotate cast convert", BlueprintAutocast),
Category="Math|Conversions")
static UE_FQuat Conv_Vector4ToQuaternion
(
const FVector4 & InVec
)
Quaternion from the Vector's direction, without any roll.