UKismetMathLibrary::Quat_Euler
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Converts a quaternion into floating-point Euler angles in degrees, returned as an FVector (Pitch=Y, Yaw=Z, Roll=X). Equivalent to converting to FRotator and reading its components.
Caveats & Gotchas
- • Euler angles are returned as (Roll, Pitch, Yaw) packed into (X, Y, Z) of the FVector — not the intuitive order. Verify component mapping before driving rotation widgets or UI displays.
- • Gimbal lock applies: when pitch approaches ±90° the roll and yaw axes align and meaningful separate values cannot be recovered. Use the quaternion directly for any math that must survive gimbal-lock poses.
Signature
static UE_INL_API FVector Quat_Euler(const FQuat& Q); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Q | const FQuat& | The quaternion to convert. | — |
Return Type
FVector Example
Display current rotation as degrees C++
FQuat ActorQuat = GetActorQuat();
FVector EulerAngles = UKismetMathLibrary::Quat_Euler(ActorQuat);
// EulerAngles.X = Roll, .Y = Pitch, .Z = Yaw
UE_LOG(LogTemp, Display, TEXT("Yaw: %.1f Pitch: %.1f Roll: %.1f"),
EulerAngles.Z, EulerAngles.Y, EulerAngles.X); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?