UKismetMathLibrary::Quat_SetFromEuler
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Converts Euler angles (degrees) into a quaternion and stores the result in Q in-place. Equivalent to Quat_MakeFromEuler but modifies an existing quaternion rather than returning a new one.
Caveats & Gotchas
- • Euler angles are interpreted as Roll (X), Pitch (Y), Yaw (Z) and applied in Yaw → Pitch → Roll order, matching UE's FRotator convention. If your source data uses a different order, results will be wrong.
- • Prefer Quat_MakeFromEuler in expression contexts — the in-place version exists mainly for Blueprint graphs where the ref node wiring is more convenient.
Signature
static UE_INL_API void Quat_SetFromEuler(UPARAM(ref) FQuat& Q, const FVector& Euler); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Q | FQuat& | The quaternion to overwrite in-place. | — |
| Euler | const FVector& | Euler angles in degrees: X=Roll, Y=Pitch, Z=Yaw. | — |
Return Type
void Example
Re-use an existing quaternion variable with new Euler values C++
FQuat Orientation;
FVector EulerAngles(0.f, 45.f, 90.f); // Roll=0, Pitch=45, Yaw=90
UKismetMathLibrary::Quat_SetFromEuler(Orientation, EulerAngles);
SetActorRotation(Orientation.Rotator()); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?