UN-Centering nodes

Godot Version

Godot 4.7.1 stable

Question

How do I make it so that resources of any kind do NOT default to being centered? I am tired of having to find a “centered” checkbox for all default 2D nodes and would like my various resources to be understood from the top left corner, as that is easier for me to understand and work with.

If this is something I would need to fix by compiling a modified version of Godot 4.7.1 I would be willing to do so. Thank you for any suggestions or solutions.

What do you mean by nodes being “centered”?

2D nodes, when placed in your scene, will default to 0,0 coordinates, and if you drag and drop them, they will be placed wherever you place them.

Are you talking about Control nodes? Control nodes also do not default to centered as far as I know.

I’m gonna use images to illustrate because I don’t know the precise terminology to be succinct and there is no easy way to find it, because I’m asking for something relatively niche.

Here is a screenshot of default behavior when instantiating a 2D node, here a CollisionShape2D:

As can be seen here, it’s “centered” on the plane. I know this doesn’t really matter for something that will be instantiated by other scenes, but I would still like it to be instantiated like the following image:

I am making a “maker game” so I would like behavior to always default to the behavior shown in the second image. Is this possible?

A CollisionShape2D is just a child of a Node2D in this case. As explained before, new children will always be created at 0,0 coordinates relative to their parents. This is the default behaviour in almost all game engines as far as I know.

I’m not sure how easy it would be to do what you’re asking, since as far as I can tell, you want something like a CollisionShape2D to spawn not at 0,0 but at an offset so the top left of the shape itself is at 0,0.
The problem here is that there are so many different nodes that might not necessarily have a shape, or an uneven shape. How do you “not center” those?

Hopefully someone else can give you a solution, but to me this sounds like a very odd thing and not something that any game engine supports by default, unless you want to work with a TileMap.