Hi devs i have a issue where i am trying to use (set position in viewport) node but is not working i have test on unreal engine 5.0 and the same pice of code works fine here is the example
If the element / control / widget is within a container, you might have issues moving it; because the container forbids it from moving.
Thanks for the response, the widget i am trying to change the position is a border with a horizontal box with items inside, so to controll the position of widget is should wrap with a canvas ? so i can use set position in the viewport ? thanks.
Yes something like that! Let me know if you ended up solving the issue!
Thanks for the help i have found the solution.
Still don’t explain why that set view port node is not working properly but doing so research i have found a much better way to do this that follow the screen size.
One more thing for those who are tring to do the same i am leaving the widget that i creating as a reference because the offset is very important to get right to, the offset is mark by the red circle
Hi! I can confirm. We have just ported our project from 5.0 to 5.1. We narrowed down when our movable widgets stopped working. It is after porting to 5.1.
I looked into Set Position in Viewport function in C++, and indeed - it has changed a lot from 5.0 to 5.1.
Basically, this function is unusable now. Completely broken.
I have a widget NOT in container. Just created and Add To Viewport called on it. This method works perfectly on UE 5.0 and before. 5.1 clearly broke it.
Yes the same here, unfortunately i way i could fix that issue is to create a widget with an empty canvas add my widget target as a children them based in the slot change the position.
Yeah I did very similar thing, now my movable stuff is on empty canvas and I am moving the slot, which works just as good for my use case. However the issue is still there, and the function should be fixed. I’ve created a bug report for this one.
+1 Also broke our placed/draggable widgets in our game after moving from 5.0 to 5.1
Our c++ code however is not broken:
CanvasSlot->SetPosition(TargetLocation);
Salut, en attendant moi j’utilise “Set render Translation” pour le repositioner correctement
This works for me in 5.1, in this case from world position to screen space, but it might help someone out.
Thanks ^^ you really helped a somebody
tout le monde le fait en anglais, personne va piger
Sadly still broken in 5.3.2. Really disappointing since I am trying to align things based on the size (i.e. pixel count) of the viewport, so this node is the bottleneck for me since I want to set positions based on pixels, not relative to canvas slots or positions in designer.