Can't get widget correct screen position

No matter what I do cannot get the correct screen position of the widget.
I check if it is correct by subtracting the MousePosition.

This snippet is just an example for things I have tried already… but no matter what I do the ScreenPosition of the widget is incorrect when scaling the viewport.

For anyone viewing this in the future, you need to multiply the mouse by the viewport scale as well.

1 Like

This is a lie btw, I used the screen space node in a material to get it to work.
I couldn’t make it work purely by cpp…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.