#Global position not equal to visual position

2 messages · Page 1 of 1 (latest)

pseudo moth
#

I'm having an issue that a Node2D in the editor says it is at the position (33, 26), and its GlobalPosition says the same, but its visual position within the game is clearly not (33, 26) (more like (99, 78)). On second thought, I have a camera with a zoom of (3, 3), so perhaps this has something to do with that since the visual coordinates are exactly three times the expected coordinates. How could I resolve this?

#

For context, this is an issue because I'm using an InputEventMouseMotion event, which apparently uses viewport-space coordinates and not the world coordinates, so the position is that three times off the actual position.