Unreal Engine 5 · Blueprint → C++
Set Relative Rotation on a Component in UE5 C++
The Set Relative Rotation node maps to USceneComponent::SetRelativeRotation, rotating a component relative to its parent. In C++ you convert your FRotator with FQuat::MakeFromRotator to use the quaternion overload.
Blueprint node & C++ equivalent

USkeletalMeshComponent* ExampleComponent;
FRotator NewRotation;
// Convert FRotator to FQuat and set relative rotation
ExampleComponent->SetRelativeRotation(FQuat::MakeFromRotator(NewRotation));The C++ equivalent
Set Relative Rotation orients a component relative to its attachment parent. The example uses the quaternion overload: ExampleComponent->SetRelativeRotation(FQuat::MakeFromRotator(NewRotation)). FQuat::MakeFromRotator converts an editor-friendly FRotator into the FQuat the engine prefers for accurate, gimbal-free rotation.
There is also an FRotator overload, so you can call SetRelativeRotation(NewRotation) directly, but the quaternion path avoids interpolation artifacts.
Why convert FRotator to FQuat?
Quaternions avoid gimbal lock and represent rotation more robustly than Euler angles, which is why USceneComponent stores rotation internally as an FQuat. Passing FQuat::MakeFromRotator(NewRotation) means no second conversion happens inside the call.
For one-off rotations either overload works; for accumulated or blended rotations the quaternion form is safer.
Frequently asked questions
How do I set relative rotation of a component in UE5 C++?+
Call Component->SetRelativeRotation(FQuat::MakeFromRotator(NewRotation)), or pass an FRotator directly to the overloaded version.
Why use FQuat::MakeFromRotator instead of passing an FRotator?+
Components store rotation as an FQuat internally, so converting first avoids an implicit conversion and prevents gimbal lock issues with chained rotations.