UKismetMathLibrary::Transform_Determinant
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Calculates the determinant of the transform's matrix. Useful for detecting whether scale is negative (indicating an axis flip / mirrored transform) or zero (indicating a degenerate, non-invertible transform).
Caveats & Gotchas
- • Internally converts the transform to an FMatrix first, so this is more expensive than a simple scale check if all you need is sign — UKismetMathLibrary::Conv_TransformToMatrix followed by Determinant does the same work explicitly.
- • A negative determinant means the transform mirrors space (e.g. one axis of scale is negative); this is the standard way to detect that case in Blueprint since scale.X < 0 alone doesn't account for combined axis flips.
Signature
static float Transform_Determinant(const FTransform& Transform) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Transform | const FTransform& | The transform to compute the determinant of. | — |
Return Type
float Example
Detect a mirrored (negatively scaled) transform C++
float Det = UKismetMathLibrary::Transform_Determinant(GetActorTransform());
bool bIsMirrored = Det < 0.f; Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?