Global position ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By samtse1000

In the context of 2d games with godot I’ve Been unable to understand what global position is?
And how it relates to position ?
( my early attempts at coordinate comparisons between node2d sub-classes was pretty confusing )
And I haven’t found anything in the docs to help
Could someone tell me what global position is and how it relates to position ?

:bust_in_silhouette: Reply From: alexass212

global position can grab the mouse position even outside the game frame.

:bust_in_silhouette: Reply From: fagnerln

On the 2d screen you will see perpendicular 2 lines, Y as green and X as red. Where they cross is the point (0,0), the .global_position is relative to this point, independent in what scene they are or who they are children. .position is relative to the parent, if you move the parent, the child moves too