RealDocs

UKismetMathLibrary::Matrix_ScaleTranslation

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns a new matrix whose translation column is component-wise multiplied by Scale3D. Only the translation part is affected; rotation and scale rows are copied unchanged.

Caveats & Gotchas

  • Only the translation (W column) is scaled — the rotation rows are not touched. This is not the same as applying a scale to the entire transform, which would also affect the rotation basis lengths.
  • Passing a Scale3D with a zero component will zero out that axis of translation permanently. There is no undo — recompute from the original if you need to restore the translation later.

Signature

static UE_INL_API FMatrix Matrix_ScaleTranslation(const FMatrix& M, FVector Scale3D)

Parameters

Name Type Description Default
M const FMatrix& The source matrix.
Scale3D FVector Per-axis scale factors to multiply into the translation component.

Return Type

FMatrix

Example

Halve the translation of a matrix (useful for interpolation setups) C++
FMatrix M = SomeTransform.ToMatrixWithScale();
FMatrix HalfTranslated = UKismetMathLibrary::Matrix_ScaleTranslation(M, FVector(0.5f, 0.5f, 0.5f));

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.