RealDocs

UKismetMathLibrary::BreakRotator

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

Description

Decomposes a rotator into its Roll, Pitch, and Yaw components in degrees. The values are not normalized — they reflect whatever was stored in the rotator.

Caveats & Gotchas

  • The raw component values can be outside [-180, 180] if the rotator was constructed with out-of-range values. Call NormalizeRotAxis on each component if you need a clamped range.
  • Display names in Blueprint map X→Roll, Y→Pitch, Z→Yaw, which is the opposite of the typical XYZ convention used by vectors — easy source of confusion when mixing rotator and vector math.

Signature

static UE_INL_API void BreakRotator(
	UPARAM(DisplayName="Rotation") FRotator InRot,
	UPARAM(DisplayName="X (Roll)") float& Roll,
	UPARAM(DisplayName="Y (Pitch)") float& Pitch,
	UPARAM(DisplayName="Z (Yaw)") float& Yaw);

Parameters

Name Type Description Default
InRot FRotator The rotator to decompose.
Roll float& Receives the roll component (X axis) in degrees.
Pitch float& Receives the pitch component (Y axis) in degrees.
Yaw float& Receives the yaw component (Z axis) in degrees.

Return Type

void

Example

Extract yaw to compare facing directions C++
float Roll, Pitch, Yaw;
UKismetMathLibrary::BreakRotator(GetActorRotation(), Roll, Pitch, Yaw);
if (FMath::Abs(Yaw) > 45.f)
{
	// Actor is facing more than 45 degrees off north
}

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.