RealDocs

UKismetMathLibrary::Multiply_MatrixMatrix

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

Description

Multiplies two 4x4 matrices together (A * B). Used to compose transformations: the result applies A's transformation first, then B's.

Caveats & Gotchas

  • Matrix multiplication is not commutative — A * B produces a different result than B * A. The order determines which transform is applied first in world space.
  • UE's FMatrix uses row-major order with row vectors, so the math convention is opposite to OpenGL column-major. When porting from other engines, verify multiplication order to avoid mirrored or incorrectly oriented results.

Signature

static UE_INL_API FMatrix Multiply_MatrixMatrix (const FMatrix& A, const FMatrix& B)

Parameters

Name Type Description Default
A const FMatrix& The left-hand matrix.
B const FMatrix& The right-hand matrix.

Return Type

FMatrix

Example

Compose local-to-parent and parent-to-world matrices C++
FMatrix LocalToParent = GetLocalMatrix();
FMatrix ParentToWorld = GetParentWorldMatrix();
// Result transforms from local space directly to world space
FMatrix LocalToWorld = UKismetMathLibrary::Multiply_MatrixMatrix(LocalToParent, ParentToWorld);

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.