RealDocs

UKismetMathLibrary::MakeRotator

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

Description

Constructs an FRotator from explicit Roll, Pitch, and Yaw values in degrees. The canonical Blueprint 'Make Rotator' node.

Caveats & Gotchas

  • FRotator stores values as (Pitch, Yaw, Roll) internally but this function accepts parameters as (Roll, Pitch, Yaw) — mismatching the order is a common source of subtle rotation bugs.
  • Values are not clamped; values outside [-360, 360] work but can cause unexpected results when interpolating with RInterpTo or comparing with NormalizeRotator.

Signature

static UE_INL_API FRotator MakeRotator(
		UPARAM(DisplayName="X (Roll)") float Roll,	
		UPARAM(DisplayName="Y (Pitch)") float Pitch,
		UPARAM(DisplayName="Z (Yaw)") float Yaw);

Parameters

Name Type Description Default
Roll float Rotation around the X axis in degrees.
Pitch float Rotation around the Y axis in degrees.
Yaw float Rotation around the Z axis in degrees.

Return Type

FRotator

Example

Create a rotator pointing 45 degrees down C++
FRotator DownRot = UKismetMathLibrary::MakeRotator(0.f, -45.f, 0.f);
MyComponent->SetWorldRotation(DownRot);

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.