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.
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.
@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.
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.