UKismetMathLibrary::BreakRotIntoAxes
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Converts a rotator into its three orthogonal unit-vector axes (forward, right, up) in world space. Equivalent to calling GetForwardVector, GetRightVector, and GetUpVector in a single call.
Caveats & Gotchas
- • The output vectors are in world space relative to the rotator's frame — if InRot is already a local-space rotator, the axes will also be in local space and may need to be transformed to world space before use.
- • Prefer this over three separate GetForwardVector/GetRightVector/GetUpVector calls when you need all three axes, as it computes the rotation matrix only once.
Signature
static ENGINE_API void BreakRotIntoAxes(const FRotator& InRot, FVector& X, FVector& Y, FVector& Z); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InRot | const FRotator& | The rotator to decompose. | — |
| X | FVector& | Receives the forward (X) axis unit vector. | — |
| Y | FVector& | Receives the right (Y) axis unit vector. | — |
| Z | FVector& | Receives the up (Z) axis unit vector. | — |
Return Type
void Example
Get all three orientation axes at once C++
FVector Forward, Right, Up;
UKismetMathLibrary::BreakRotIntoAxes(GetActorRotation(), Forward, Right, Up);
// Use Forward/Right/Up for projectile direction, strafe, or jump direction See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?