Screen space Widgets not aligned

Hi

widgets that use screen space are not aligned with the player they are attached to, works fine in world space

Any ideas how to solve this? seems like a bug because its not just my project its all projects that I open.

Thanks in advance

Depending on how you set things up screen space (OS 1920x1080 for example) can be different from viewport size (1280x720). You may need to convert to local.

If you tell the widget to show at 1500x800, it’s going to disappear.

I hope I understood you right.

Consider posting a snippet of what you’re trying to achieve, as in what controls the position of what.

doesn’t seem to matter how the widget is set up. This project was bought from the marketplace and as you can see from the image to pink do is supposed to be over the target character at back on right as is the case in the promo videos for the project. I have contacted the developer no word yet.

As far as I can work out the widget is just a child of the mesh as a widget component and its position is not being overridden in blueprints. in the viewport the widget is set to be above the capsule. the screen size and viewport are both set to iPhone 8+

I’ve checked numerous tutorials and the settings I have here should work - I just don’t really know how to solve it.

As far as I can work out the widget is
just a child of the mesh as a widget
component and its position is not
being overridden in blueprints.

Difficult to pinpoint the issue with so little info.

  • now we know it’s a widget component rather than a plain widget in screenspace
  • widget components can operate in either world or screenspace - which one are we dealing with here? I know you mentioned screenspace in your original post but you did not mention it’s a widget component, hence my question.

Judging by the image, I’d guess the widget component is operating in screen space, in which case I’d have a close looks at its Draw Size and Pivot. Also make sure the widget component does not have its location offset.

I’ve tested this quickly in a clean project and it seems to work just fine:

Image from Gyazo

Not sure at this point, perhaps the image itself has a Render Transform (translation) offset in the 2d widget. I mean this:

253970-capture.png

hi

yes sorry I know there is very little to go on which is why I’m so stumped.

its a widget component parented to the mesh. It’s using screen space. All transforms on widget component and widget are zero, pivots are 0.5 in both axis and the draw size matches icon size. widget is set to iPhone 8 + screen size and desired on screen. viewport is set to iPhone 8+

thanks for your help

Currently I’d 100% blame the canvas. In your original screenshot there is none…

it still off set fro me - what I am doing wrong?

Do tell if you ever find the root of this evil.

And good luck.

just tested it again with 4.19.2 and it works perfectly as normal, must be something to do with 4.20.2

thank you very much for your help

yes - I will post here the number of times I’ve found an answer posts like these is amazing. it’s contributors like yourself that make the game dev community so good. Thanks a lot