RealDocs

UKismetMathLibrary::ComposeTransforms

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

Description

Composes two transforms as A * B, yielding a transform that first applies A and then B. Used to concatenate local-to-parent and parent-to-world transforms, or to apply a delta in a specific space.

Caveats & Gotchas

  • Order is critical and non-commutative: A * B ≠ B * A in general. `ComposeTransforms(Delta, LocalToWorld)` applies Delta in local space; `ComposeTransforms(LocalToWorld, Delta)` applies Delta in world space — swapping the arguments gives a completely different result.
  • Non-uniform scale in both A and B can produce shear, which FTransform does not represent; the resulting scale may be incorrect. If either transform has non-uniform scale, prefer composing without scale or use FMatrix for full shear support.

Signature

static UE_INL_API FTransform ComposeTransforms(const FTransform& A, const FTransform& B)

Parameters

Name Type Description Default
A const FTransform& The first transform to apply (inner/left).
B const FTransform& The second transform to apply (outer/right).

Return Type

FTransform

Example

Apply a local-space offset to an actor's world transform C++
FTransform LocalOffset = UKismetMathLibrary::MakeTransform(FVector(100, 0, 0), FRotator::ZeroRotator);
FTransform WorldTM = UKismetMathLibrary::ComposeTransforms(LocalOffset, Actor->GetActorTransform());

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.