UKismetMathLibrary::Quat_MakeFromEuler
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Constructs and returns a quaternion from Euler angles in degrees. The angles are applied in Yaw → Pitch → Roll order, matching UE's standard FRotator convention.
Caveats & Gotchas
- • Euler angles suffer from gimbal lock near ±90° pitch. If you store rotations in Euler form and later reconstruct them, avoid storing intermediate values near the gimbal lock singularity — the round-trip will lose yaw/roll information.
- • The input FVector packs the angles as (Roll=X, Pitch=Y, Yaw=Z). This differs from how FRotator stores them (Pitch, Yaw, Roll). Convert carefully when mixing the two representations.
Signature
static UE_INL_API FQuat Quat_MakeFromEuler(const FVector& Euler); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Euler | const FVector& | Euler angles in degrees: X=Roll, Y=Pitch, Z=Yaw. | — |
Return Type
FQuat Example
Create a quaternion from designer-friendly Euler angles C++
// Rotate 90° around world up (Yaw), 0 pitch and roll
FVector DesiredEuler(0.f, 0.f, 90.f); // (Roll, Pitch, Yaw)
FQuat RotQuat = UKismetMathLibrary::Quat_MakeFromEuler(DesiredEuler);
SetActorRotation(RotQuat.Rotator()); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?