For my current project I would like to move certain world elements to a location on screen that’s defined by the position of a widget.
The widget is visible here and its anchor is in the top left corner:
To convert the widget’s location to world space I’m doing this:
Note that it also contains the Draw Debug Sphere node.
The result in game is this:
As you can see, the Debug Sphere is drawn with an offset from where I would expect it.
If I change the anchor of the image in the UI editor (to the center of the screen for example) the debug sphere is drawn somewhere off screen, making the anchor in the top left corner the only option that gives me a visible result at all.
Is this a bug or am I doing something wrong?
Any help with this would be greatly appreciated!