UKismetMathLibrary::Add_QuatQuat
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Adds two quaternions component-wise (A + B). The result is generally not a unit quaternion and has no direct geometric interpretation as a rotation.
Caveats & Gotchas
- • Component-wise addition does not produce a valid rotation quaternion — the result must be normalized before it can be used as a rotation. This operation is mainly useful for quaternion blending (LERP numerator) rather than rotation composition.
- • Do not confuse with Multiply_QuatQuat, which composes rotations. Add_QuatQuat is a linear algebra operation, not a rotation concatenation.
Signature
static UE_INL_API FQuat Add_QuatQuat(const FQuat& A, const FQuat& B) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FQuat& | First quaternion operand. | — |
| B | const FQuat& | Second quaternion operand. | — |
Return Type
FQuat Example
Manual nlerp between two quaternions C++
// Simple normalized linear interpolation (nlerp) — cheaper than Slerp
float Alpha = 0.5f;
FQuat Blended = UKismetMathLibrary::Add_QuatQuat(
A * (1.0f - Alpha),
B * Alpha
);
Blended.Normalize(); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?