UKismetMathLibrary::Matrix_Identity
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the 4x4 identity matrix: 1s on the main diagonal and 0s everywhere else. Multiplying any matrix by the identity matrix leaves it unchanged.
Caveats & Gotchas
- • In C++ you can also use FMatrix::Identity directly as a constant without a function call — this function exists primarily for Blueprint exposure.
- • The identity matrix represents no transformation (no translation, no rotation, scale of 1). Initializing transform matrices to identity is important before accumulating transforms to avoid garbage values.
Signature
static UE_INL_API FMatrix Matrix_Identity() Return Type
FMatrix Example
Initialize a matrix accumulator C++
FMatrix AccumulatedTransform = UKismetMathLibrary::Matrix_Identity();
for (const FMatrix& M : BoneMatrices)
{
AccumulatedTransform = UKismetMathLibrary::Multiply_MatrixMatrix(AccumulatedTransform, M);
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?