UKismetMathLibrary::Matrix_GetScaledAxes
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Retrieves all three scaled axis vectors (rows 0, 1, 2) of the matrix in a single call. Each output vector's magnitude equals the scale along that axis.
Caveats & Gotchas
- • Output vectors are NOT unit length — they retain the matrix's scale. Use Matrix_GetUnitAxes if you need normalised direction vectors.
- • In Blueprint, output pins for ref parameters appear as separate output execution pins. In C++ you must declare the three FVector variables before calling.
Signature
static UE_INL_API void Matrix_GetScaledAxes(const FMatrix& M, FVector &X, FVector &Y, FVector &Z) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| M | const FMatrix& | The matrix to read axes from. | — |
| X | FVector& | Output: the scaled X axis (row 0). | — |
| Y | FVector& | Output: the scaled Y axis (row 1). | — |
| Z | FVector& | Output: the scaled Z axis (row 2). | — |
Return Type
void Example
Decompose all three axes at once for custom matrix math C++
FMatrix M = SomeTransform.ToMatrixWithScale();
FVector X, Y, Z;
UKismetMathLibrary::Matrix_GetScaledAxes(M, X, Y, Z);
// X, Y, Z now hold scaled row vectors — lengths equal per-axis scale Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?