UKismetMathLibrary::Conv_MatrixToTransform
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Converts an FMatrix to an FTransform, decomposing it into translation, rotation, and scale. Assumes the matrix is a pure transform with no shear.
Caveats & Gotchas
- • If the matrix contains shear, the resulting FTransform will silently discard it — FTransform cannot represent shear and will only extract scale magnitude per axis.
- • Scale extraction uses the length of each basis row vector; if the matrix was built from non-uniform scales combined with rotation the decomposition may not round-trip cleanly back to the original matrix.
Signature
static UE_INL_API FTransform Conv_MatrixToTransform(const FMatrix& InMatrix) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InMatrix | const FMatrix& | The matrix to convert. Must represent a valid transform (no shear). | — |
Return Type
FTransform Example
Convert a bone matrix from an animation system to FTransform C++
FMatrix BoneMatrix = SkeletalMeshComponent->GetBoneMatrix(BoneIndex);
FTransform BoneTransform = UKismetMathLibrary::Conv_MatrixToTransform(BoneMatrix);
FVector BoneLocation = BoneTransform.GetLocation(); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?