UKismetMathLibrary::Matrix_GetOrigin
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the translation component (origin) of the coordinate system represented by the matrix. This is the fourth column (W column) of the matrix.
Caveats & Gotchas
- • This reads the W column directly without perspective division. If the matrix encodes a perspective projection rather than a transform, the result will not be a meaningful world-space position.
- • The returned FVector is the 3-component W column; the fourth component (W=1 in an affine transform) is dropped. Use Matrix_TransformPosition to transform actual positions.
Signature
static UE_INL_API FVector Matrix_GetOrigin(const FMatrix& InMatrix) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InMatrix | const FMatrix& | The matrix whose translation/origin to extract. | — |
Return Type
FVector Example
Extract world position from a bone matrix C++
FMatrix BoneMatrix = SkeletalMesh->GetBoneMatrix(BoneIndex);
FVector BoneWorldPos = UKismetMathLibrary::Matrix_GetOrigin(BoneMatrix); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?