UWidget::SetRenderTransformAngle
#include "Components/Widget.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets only the rotation component of the widget's render transform in degrees, leaving translation, scale, and shear unchanged. Useful for animating a spinning widget without constructing a full FWidgetTransform each frame.
Caveats & Gotchas
- • Angle is in degrees, not radians. Positive values rotate clockwise on screen (Y-down coordinate system).
- • This only changes the rotation; existing scale, shear, and translation in the render transform are preserved. If you need to reset everything, use SetRenderTransform with a default-constructed FWidgetTransform.
- • Like all render transforms, this is cosmetic — layout and hit-test bounds stay at the widget's original unrotated rectangle.
Signature
UMG_API void SetRenderTransformAngle(float Angle) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Angle | float | Rotation angle in degrees, applied clockwise. | — |
Return Type
void Example
Spin a loading indicator each tick C++
// Inside NativeTick:
CurrentAngle += DeltaTime * 180.f; // 180 degrees/sec
SpinnerWidget->SetRenderTransformAngle(CurrentAngle); Tags
Version History
Introduced in: 4.7
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?