finding the exact centre of widget ?

Hi all,

I have some nodes that should find the centre of a particular node when my program is run. I have used this location as the end point of a bunch of splines.

image

However when I run it, the position is slightly offset to the left and i cant figure out why.

The widget is just a button called from another BP.

These are my nodes:

So i basically just getting the tick space geo and finding local size of node and dividing x and y by 2. and then adding these values to the result of ‘get local top left’.

If anyone can point my to the reason for the offset, i would appeciate much.
thanks

Maybe you should try LocalToViewport:

image

But LocalTopLeft works well for me:

Could you provide more details?

My Products

2 Likes

Thanks alot for your help mate. Showing me that it should be working made be look closer at the button BP and i realised the button contains an empty text block that i think was offsetting the width of the button due to a padding value of 4 inside. I removed it and it works now.

Thanks,
SAm

1 Like