Text of any kind disappears from my UMG widgets whenever I use “SetPositionInViewport” to move them somewhere.
There’s another post about it here:
However this was flagged as solved by using another method (SetRenderTranslation).
SetRenderTranslation does not follow the mouse accurately, even when using some math to adjust for the screen size vs the widget canvas.
If the resolution is not a standard resolution, the thing following the mouse will become slightly more offset as the cursor is going towards either the right or bottom end of the window.
SetPositionInViewport is very accurately following the mouse so I’d like to be able to use that, but at the moment this makes all my text disappear from the widget.
I have answered a similar question to this one. I may have a workaround for you. Check out this the following link:
Note that there is a slight modification that I have found that helps make this a little more friendly. I have noted the difference is the blueprint that you will find at the link. I hope this helps.
Make it a great day
Thanks for the quick response!
However, that method doesn’t fix the offset issue that happens when you resize the game window though. The result is the same as with “SetRenderTranslation”.
“SetPositionInViewport” has no issue at all with resizing the game window but the method you posted as well as “SetRenderTranslation” both become offset if I change the resolution. It remains broken after that happens even after I restore the window to the size it was at startup.
The offset becomes bigger the further away the window gets from the upper left corner.
I have went back and looked through my blueprints. I have corrected the offset error by setting the anchor instead of the position of the widget. After testing it appears to maintain it’s accuracy through all window sizes and changes. If there are any more errors with my blueprints please let me know. I hope this update helps.
NOTE: The node name covered by the tool tip is the SET POSITION node for the widget. It just needs to be set to 0,0.
Make it a great day
Yep, I got it working following this example and replicating the process for some extra adjustments. Thank you, made my day!