UWidget/UUserWidget position

Hi and thanks for stopping by,

So I want to make a line on my HUD to show some specific informations. The problem is that I want this line to be between two UUserWidgets contained in another one. Hence my needs of getting their positions. I’ve looked at the code, all the functions etc. but none are fitting my needs… I’ve also read this post here. I cannot use this solution because my UUserWidgets are not direct children of the Canvas Panel, thus their slots cannot be turned into CanvasPanelSlots…

I also tried GetFullScreenAlignment but it’s giving me a user widget alignment on its own screen and not among its parent.

If you have any idea, I’d be glad to try it out, have a nice weekend !

If you want to position widgets relative to one another, I’d recommend using some kind of panel. A VerticalBox would allow you to easily position three widgets below one another without needing to position them manually.

This is not really what I want. I want a way to find widget on screen positions to be able to trace lines between them (or do anything else implying the need of the positions). Having them in a panel (or a VBox) won’t let me get the position. That’s why I implemented the solution with the tick function, but I wanted to know if there was any workaround or if something like that would be implemented in a next release.

Nothing on this ?

We are curious about this too. Seems really bizarre not to be able to get a handle on a widget’s position data…

Went exploring in the SlateApplication code and got a serious headache exploring all the ArrangedWidget, WidgetAndPointer, FArrangedChildren, Routing, Replys, etc. and function calls with Lambda definitions embedded directly in them.

Best I can tell is that the screen (index 0 in a WidgetPath) knows about its dimensions and then recursively goes down through its children and the children’s geometry is calculated from that initial screen geo as the code goes down to each “leaf”.

Would be nice to have simple accessors on each widget to get at info like this. Relying on a tick function doesn’t really make sense.