UKismetMathLibrary::Quat_Exp
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Computes the quaternion exponential, mapping a pure quaternion (W=0, V=theta*v) back to a unit quaternion via Exp(q) = (sin(theta)*v, cos(theta)). Used together with Quat_Log for quaternion calculus operations such as squad interpolation.
Caveats & Gotchas
- • The input is expected to have W=0. Passing a general unit quaternion produces mathematically defined but physically meaningless results — this is not a general-purpose exponentiation.
- • Quat_Exp and Quat_Log are inverse operations only for pure quaternions. Applying Log then Exp to an arbitrary unit quaternion does not round-trip perfectly when the quaternion has a non-zero W component.
Signature
static UE_INL_API FQuat Quat_Exp(const FQuat& Q); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Q | const FQuat& | A pure quaternion (W=0) of the form theta*v where |v|=1. | — |
Return Type
FQuat Example
Round-trip through Log/Exp C++
FQuat Original = FQuat(FVector(0, 0, 1), FMath::DegreesToRadians(90.f));
// Log produces a pure quaternion
FQuat LogQ = UKismetMathLibrary::Quat_Log(Original);
// Exp recovers the original
FQuat Recovered = UKismetMathLibrary::Quat_Exp(LogQ);
// Recovered ≈ Original See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?