RealDocs

UKismetMathLibrary::GetAxes

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

Description

Retrieves the three orthogonal axes of the reference frame described by rotation A. This is the Blueprint-callable version of BreakRotIntoAxes.

Caveats & Gotchas

  • GetAxes and BreakRotIntoAxes are functionally identical — GetAxes is the Blueprint-exposed wrapper. In C++ prefer BreakRotIntoAxes to keep call sites consistent, or call A.GetAxes() directly on the FRotator.
  • All three output vectors are unit vectors computed from the same rotation matrix, so they are guaranteed to be orthogonal to each other. Do not re-orthogonalize them.

Signature

static ENGINE_API void GetAxes(FRotator A, FVector& X, FVector& Y, FVector& Z);

Parameters

Name Type Description Default
A FRotator The rotation whose axes to compute.
X FVector& Receives the forward (X) unit vector.
Y FVector& Receives the right (Y) unit vector.
Z FVector& Receives the up (Z) unit vector.

Return Type

void

Example

Build a movement input vector in camera space C++
FVector CamX, CamY, CamZ;
UKismetMathLibrary::GetAxes(CameraRotation, CamX, CamY, CamZ);
FVector InputDir = CamX * ForwardAxis + CamY * RightAxis;
InputDir.Z = 0.f;
InputDir.Normalize();
AddMovementInput(InputDir);

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.