UWidget::SetRenderTransform
#include "Components/Widget.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Applies a 2D render transform (translation, rotation, scale, shear) to the widget. The render transform is cosmetic only — it moves how the widget is drawn without affecting layout or hit-testing bounds.
Caveats & Gotchas
- • The render transform is purely visual and does not affect the widget's layout size or position in the widget tree. Child widgets and siblings are laid out as if no render transform exists.
- • Hit-testing uses the layout geometry, not the paint geometry. A widget visually shifted by a large translation can still receive clicks at its original layout position.
- • The pivot point for rotation and scale is controlled separately via SetRenderTransformPivot. The default pivot is (0.5, 0.5) — the widget center.
Signature
UMG_API void SetRenderTransform(FWidgetTransform InTransform) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InTransform | FWidgetTransform | The new render transform containing Translation, Scale, Shear, and Angle. | — |
Return Type
void Example
Rotate and scale a widget C++
FWidgetTransform Transform;
Transform.Angle = 45.f;
Transform.Scale = FVector2D(1.5f, 1.5f);
Transform.Translation = FVector2D::ZeroVector;
Transform.Shear = FVector2D::ZeroVector;
MyWidget->SetRenderTransform(Transform); Tags
Version History
Introduced in: 4.7
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?