This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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 ?

in Engine by (16 points)

2 Answers

+1 vote

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

by (23 points)
+1 vote

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

by (108 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.