RealDocs

UKismetMathLibrary::MakeRotationFromAxes

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

Description

Builds a rotator from a full set of three axis vectors (Forward, Right, Up). All three axes are considered — use this when you have an explicit reference frame rather than deriving axes from one or two vectors.

Caveats & Gotchas

  • The three axes must form a right-handed orthonormal basis; non-orthogonal or non-unit inputs will produce an invalid FRotator that represents no clean Euler decomposition, causing shearing or flipping in downstream transforms.
  • Parameters are passed by value (not const ref), which triggers a copy — a minor cost, but notable if called in a tight loop with large batches.

Signature

static ENGINE_API FRotator MakeRotationFromAxes(FVector Forward, FVector Right, FVector Up);

Parameters

Name Type Description Default
Forward FVector Desired forward (X) direction.
Right FVector Desired right (Y) direction.
Up FVector Desired up (Z) direction.

Return Type

FRotator

Example

Reconstruct a rotation from a stored basis C++
FVector Fwd = StoredTransform.GetUnitAxis(EAxis::X);
FVector Rgt = StoredTransform.GetUnitAxis(EAxis::Y);
FVector Up  = StoredTransform.GetUnitAxis(EAxis::Z);
FRotator Rot = UKismetMathLibrary::MakeRotationFromAxes(Fwd, Rgt, Up);

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.