UKismetMathLibrary::NotEqual_QuatQuat
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if two quaternions differ by more than the given per-component tolerance. Maps to the != operator in Blueprints.
Caveats & Gotchas
- • Like EqualEqual_QuatQuat, this performs component-wise comparison — Q and -Q (same rotation, opposite sign) will return true (not equal) even though they represent identical rotations.
- • The parameter is named ErrorTolerance here but Tolerance in EqualEqual_QuatQuat; both default to 1e-4f and behave identically.
Signature
static UE_INL_API bool NotEqual_QuatQuat(const FQuat& A, const FQuat& B, float ErrorTolerance = 1.e-4f) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FQuat& | First quaternion to compare. | — |
| B | const FQuat& | Second quaternion to compare. | — |
| ErrorTolerance | float | Maximum per-component absolute difference still considered equal. | 1.e-4f |
Return Type
bool Example
Detect a rotation change before updating C++
if (UKismetMathLibrary::NotEqual_QuatQuat(NewRotation, LastRotation))
{
SetActorRotation(NewRotation.Rotator());
LastRotation = NewRotation;
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?