Normally anything outside of a widget is clipped - like the text widget I’ve highlighted in red.
What I want is to place widgets around the outside like the widgets I’ve labelled “Child”. Is this possible?
Hey, dunno what your intention is, why you want that though.
I havnt tried it but maybe using the Transform Scale of a Widget could be working. For the text: Place that widget inside the Parent correctly (without clipping) and then use the text´s transform to scale it up, so it would
go beyond the parents desired space. Or maybe Sizebox could work too.
What I want is to create a sort of overlay for 3D objects on screen.
First I project the object’s bounds onto the screen (the cyan outline in the left picture).
From there I thought it would be simple to just place a widget with that exact position and size, and place things like a health bar, buttons, etc. around it using the canvas panel alignment and anchors.
I have tried the render transform but it has two problems. The first is that it works in pixels, so I can’t align something to the right or left independent of its size.
The second is that the transform is applied after clipping, so if the widget is partly off screen, the child widgets may be partially clipped, eg:
not sure what you mean by clipping. have you added the widget to the actors components ? this way, as I know, widgets can get off screen. it doesn’t use any anchors in screenspace
Clipped as in cut off by the screen - that’s what I was showing in the previous image I posted.
Here I’ve added some outlines to it to more clearly show what’s happening:
And actor widget components still have the same problems: you can’t position child widgets outside of their parents, and using the render transform will clip the widgets in odd ways.
I’ve made a test and taken some screenshots to demonstrate:
Create a widget, add an image (or any component) and anchor it to the right edge. Set it’s width to 500 and transform to 500 so that it is displayed outside of its parent.
I’m not 100% sure if I could be much help however I suggest using a Canvas Panel inside of another Canvas Panel in UMG and somehow centring the inner Canvas Panel on the object.
Thanks, but I couldn’t get anything to work the way I wanted using the existing widgets.
I have however managed to hack together my own widget to do what I want using C++.
What I did was duplicate the canvas panel widget, and added in a RegionMin and RegionMax property. It works exactly like the canvas panel except that the children are positioned according to the RegionMin and RegionMax values instead of the canvas bounds.