How to specify the pivot point of my sprites?

Godot Version

4.2.1

Question

I need to update the pivot point of my sprites to center+bottom. I assumed this was done by setting the Offset to 0.5 and 1.0 (or 0.0), but I see now that the Offset isn’t proportional but based on actual pixels height/width?

I need to do this for a bunch of sprites (all with varying sizes). I understand I can do the math and set the offsets in runtime, but it would be helpful to specify it in the editor as I would then get a preview of how they are placed.

Is there anyway to do this in the editor? It seems strangely limiting to have a Centered checkbox rather than being able to specify Anchors points to me.

Thanks

It’s not possible out of the box. Maybe there’s an add-on for that.

You can do math in the input boxes like, if your sprite is 64px wide you can set the offset.x to 64/2.0 and it will do the calculation.

You can also use a Node2D as a parent of the sprite and use it like a pivot.

1 Like