I have this Widget that forms part of the playable actor in game (it’s a paper2D character, so the widget is always facing to the camera, and thus I do not need to worry about the z coordinate too much.)
The issue is that I need to set the mouse position when the game pad or keyboard is used (to get On Hover effects triggered). For widgets attached to the viewport, that is not an issue, since I can use these operations to get an accurate position of the widget button:
But since this particular widget is an actor component, the widget is a member of the level world so when i try to use the same function, it gives me negative coordinates, probably since it is not attached to the viewport. This makes it very hard to set the mouse coordinates to the widget coordinates reliably regardless of screen size of the game.
I am wondering if there is a way from the world coordinates of the particular widget to be directly translated to the relative viewport coordinates (or what the camera sees for that matter.)