Set Position In Viewport broken in UE 5.1 ?

Hello

I just migrated from UE 5.0.3 to UE 5.1, and it seems that the set position in viewport node doesn’t work anymore ? The position that I am feeding to it seems to return correct coordonates like in the previous version of the engine, but somehow the position set visually with the ‘Set Position In Viewport’ node is by default putting it in the top left corner of the screen, with no possibility to adjust it.

Anybody encountered this issue ?
Thanks !

3 Likes

Indeed it seems that SetPositionInViewport is broken…

If you need workaround you can use Set Position from Canvas Panel Slot.

Short example:
image

I have the same problem.

Yep this happens for me as well

Has there been any information in when a fix for this is expected?

Or am I better off continuing development in 5.0.3 at this time? I have multiple widgets that use this function in my project.

Continue with 5.0.3. There are many other bugs so far in 5.1 and the new features aren’t so amazing that someone need that buggy upgrade.

1 Like

Looks like it’s fixed in the latest hotfix patch: https://github.com/EpicGames/UnrealEngine/commit/fed3367a097ab23bef8c35aa82408b375f505305

You might not have permission to see this.

1 Like

For anyone who is still stuck on this and nothing seems to be working. You may have to resort to an Widget Component in an Actor.

Or just wait for the next patch, might already be fixed.

Hi, quick update here, i have tested this on the dev build of 5.2, this seems to be fixed, i don’t know when is the planned release date for 5.2, but it should be fixed on that version.

2 Likes

I have this problems since update from 5.1.0 to 5.1.1

@imnomad Hi, quick update here, i have tested this on the dev build of 5.2, this seems to be fixed, i don’t know when is the planned release date for 5.2, but it should be fixed on that version.

I’m on 5.2 and it still doesn’t work for me.

@FaceW.TearsOfJoy’s solution of using CanvasPanelSlot::SetPosition does not work exactly the same as SetPositionInViewport but may be sufficient for some people.

@ItzBenjyHere For anyone who is still stuck on this and nothing seems to be working. You may have to resort to an Widget Component in an Actor.

Taking this advice, I added a Widget Component to the HUD Actor, and updated its world position when needed. It works.

Same Problem here in UE 5.2

The SetPosition from the Target User Widget does not have any effect.

Using the setTransform of a canvas wrapper instead ran me in to some scaling issues when tried using ProjectWorldLocationToWidgetPosition to set a Point of Interesst Widget (WorldMarker).

The coordinates are correct when having the game on fullscreen but when the game runs in windowed mode with custom resolution the coordinates have an offset due to the viewport scale.

Hope this will get fixed…

1 Like

Still broken for me in 5.3.2, real bummer.

1 Like

I have the same problem, but you can try “UWidget::SetRenderTranslation(Fvector2D )” to solve the problem.

1 Like