RealDocs

UKismetMathLibrary::Conv_MatrixToTransform

function Engine Blueprint Since 4.0
#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();

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.