RealDocs

UKismetMathLibrary::Matrix_ConcatenateTranslation

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

Description

Returns a new matrix with the given translation vector added to the matrix's existing translation. Equivalent to appending a pure-translation matrix on the right.

Caveats & Gotchas

  • The translation is added in the coordinate space of the matrix's output (world space for a typical model matrix), not in the matrix's local space. If you want local-space offset, transform Translation by the matrix's rotation first.
  • Does not modify the input matrix — the result is a new FMatrix. Chaining multiple calls is safe but each call allocates a new matrix value on the stack.

Signature

static UE_INL_API FMatrix Matrix_ConcatenateTranslation(const FMatrix& M, FVector Translation)

Parameters

Name Type Description Default
M const FMatrix& The source matrix.
Translation FVector World-space offset to add to the matrix's existing translation.

Return Type

FMatrix

Example

Offset a transform matrix without rebuilding it C++
FMatrix Base = MyActor->GetTransform().ToMatrixWithScale();
FVector Offset(0.f, 0.f, 100.f);
FMatrix Shifted = UKismetMathLibrary::Matrix_ConcatenateTranslation(Base, Offset);
// Shifted now represents the same rotation/scale but 100 units higher

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.