UKismetMathLibrary::EqualEqual_TransformTransform
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if two transforms are exactly equal, comparing each component with strict floating-point equality. Use only when transforms originate from identical data sources with no arithmetic.
Caveats & Gotchas
- • Strict float equality is almost never the right check after any math operations — floating-point rounding will cause two transforms that should be equal to return false. Prefer NearlyEqual_TransformTransform with an appropriate tolerance for all practical uses.
- • Internally calls FTransform::Equals with zero tolerance, which compares the quaternion, translation, and scale3D fields individually. Two representations of the same orientation stored as different quaternions (e.g., q and -q) will not be equal.
Signature
static UE_INL_API bool EqualEqual_TransformTransform(const FTransform& A, const FTransform& B) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FTransform& | First transform to compare. | — |
| B | const FTransform& | Second transform to compare. | — |
Return Type
bool Example
Assert a cached transform was not modified C++
// Only reliable when both sides come from the exact same stored data
checkf(UKismetMathLibrary::EqualEqual_TransformTransform(CachedTM, InitialTM),
TEXT("Transform was unexpectedly mutated")); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?