Download

Is it possible to place a UMG widget outside of its parent without clipping it

Here’s an example of what I’m talking about:
umg.jpg

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.

why do you want it to be outside? maybe start an animation for that textblock. you can push it out of the parent with changing the transform

What I want is to create a sort of overlay for 3D objects on screen.
c7d1f0c204099d03cc0c1f4a62768c555c354e1f.jpeg
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:
clip.jpg

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:
11919e49b3a2146da4ac67287489a308ebfa7a2b.png

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.
1.jpg

Add a widget component to an actor, select the widget, and set Space to Screen.
2.jpg

The top image shows how it looks normally, and the bottom shows what happens if you move the camera so that the actor is partially off screen.
3.jpg

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.
2728ffbab58bbc22ee6a8ef7ca399f1745216669.png

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.

Here’s the widget in UMG:
b06ae842f0f1162949a087e22f88c321759668d8.jpeg

And in action in-game:
31b8389b87c6af897898f66d945efce1cff78358.jpeg

Maybe there’s a better way, but for now this works.

Can you show the code for this canvas? I’m trying to do the exact same thing

Use render transform and translate it…
I m tring to do the exact oppose thing and my issue is that it won’t clip it!