Unreal Engine 5 · Blueprint → C++
Set Actor Rotation in Unreal Engine 5 C++
The Blueprint Set Actor Rotation node maps to SetActorRotation in C++. A common pattern converts an FRotator with FQuat::MakeFromRotator(NewRotation) and passes the quaternion to set the actor's orientation.
Blueprint node & C++ equivalent

AActor* ExampleActor;
FRotator NewRotation;
// Convert FRotator to FQuat and set actor rotation
ExampleActor->SetActorRotation(FQuat::MakeFromRotator(NewRotation));What does the Set Actor Rotation node do?
Set Actor Rotation sets an actor's world-space orientation to an absolute rotation. In Blueprint you feed it a Rotator. In C++, AActor::SetActorRotation is overloaded and accepts either an FRotator or an FQuat.
How to use it in C++
Build your orientation as an FRotator NewRotation, then convert it with FQuat::MakeFromRotator(NewRotation) and call ExampleActor->SetActorRotation(FQuat::MakeFromRotator(NewRotation));. Using the quaternion overload avoids gimbal ambiguity and is the precise form the engine works with internally.
You can also pass the FRotator directly to SetActorRotation, since an overload accepts it; the explicit FQuat conversion just makes the rotation representation unambiguous.
Frequently asked questions
Why convert FRotator to FQuat for SetActorRotation in UE5?+
Quaternions avoid gimbal lock and represent the rotation the engine stores internally. FQuat::MakeFromRotator converts an FRotator into that form before you set it.
Can I pass an FRotator directly to SetActorRotation?+
Yes. SetActorRotation has an overload that takes an FRotator, so passing one directly is valid; converting to FQuat is just a more explicit alternative.